feat: add Go SDK package (REST client + VL1 agent + TAP device)
This commit is contained in:
26
sdk/tap_stub.go
Normal file
26
sdk/tap_stub.go
Normal file
@@ -0,0 +1,26 @@
|
||||
//go:build !linux
|
||||
|
||||
package sdk
|
||||
|
||||
import "fmt"
|
||||
|
||||
type tapInterface struct {
|
||||
Name string
|
||||
MTU int
|
||||
}
|
||||
|
||||
func openTap(name string, mtu int) (*tapInterface, error) {
|
||||
return nil, fmt.Errorf("TAP device requires Linux")
|
||||
}
|
||||
|
||||
func (ti *tapInterface) Read(buf []byte) (int, error) {
|
||||
return 0, fmt.Errorf("not supported")
|
||||
}
|
||||
|
||||
func (ti *tapInterface) Write(buf []byte) error {
|
||||
return fmt.Errorf("not supported")
|
||||
}
|
||||
|
||||
func (ti *tapInterface) Close() error {
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user