NewStack builds new ip stack (using gVisor)
(ctx context.Context, options StackOptions, handler *Handler)
| 48 | |
| 49 | // NewStack builds new ip stack (using gVisor) |
| 50 | func NewStack(ctx context.Context, options StackOptions, handler *Handler) (Stack, error) { |
| 51 | gStack := &stackGVisor{ |
| 52 | ctx: ctx, |
| 53 | tun: options.Tun.(GVisorTun), |
| 54 | idleTimeout: options.IdleTimeout, |
| 55 | handler: handler, |
| 56 | } |
| 57 | |
| 58 | return gStack, nil |
| 59 | } |
| 60 | |
| 61 | // Start is called by Handler to bring stack to life |
| 62 | func (t *stackGVisor) Start() error { |
no outgoing calls
no test coverage detected
searching dependent graphs…