Skip to content

Refactor to match golang standard practices #135

@louisroyer

Description

@louisroyer
  • avoid having multiple api packages
  • create errors types
  • avoid starting a new gorouting each time we get a new packet (
    go func(ctx context.Context, iface *iproute2.TunIface) {
    ): at high rates, this will just consume a lot of memory; use a finite number of workers, and recycle memory using a sync.Pool
  • rework the pattern "register task, then run init, then run exit": this creates a lot of boilerplate; when we do Setup.Run(), we should instead start tasks directly, and optionally defer a Close() method

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request
No fields configured for Feature.

Projects

Status
Far future

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions