stn

package
v3.3.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterSTNServer

func RegisterSTNServer(s *grpc.Server, srv STNServer)

Types

type STNClient

type STNClient interface {
	// The request to steal (unconfigure) an interface identified by its name.
	StealInterface(ctx context.Context, in *STNRequest, opts ...grpc.CallOption) (*STNReply, error)
	// The request to revert config of a previously "stolen" (unconfigured) interface.
	ReleaseInterface(ctx context.Context, in *STNRequest, opts ...grpc.CallOption) (*STNReply, error)
	// Request to return information about the stolen interface.
	StolenInterfaceInfo(ctx context.Context, in *STNRequest, opts ...grpc.CallOption) (*STNReply, error)
}

STNClient is the client API for STN service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewSTNClient

func NewSTNClient(cc *grpc.ClientConn) STNClient

type STNReply

type STNReply struct {
	// Result code. 0 = success, non-zero = error.
	Result uint32 `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"`
	// Error string in case that result != 0.
	Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	// PCI address of the interface.
	PciAddress string `protobuf:"bytes,3,opt,name=pci_address,json=pciAddress,proto3" json:"pci_address,omitempty"`
	// List of IP addresses assigned to the interface.
	IpAddresses []string `protobuf:"bytes,4,rep,name=ip_addresses,json=ipAddresses,proto3" json:"ip_addresses,omitempty"`
	// List of routes related to the interface.
	Routes []*STNReply_Route `protobuf:"bytes,5,rep,name=routes,proto3" json:"routes,omitempty"`
	// Kernel driver used by this interface before stealing.
	KernelDriver         string   `protobuf:"bytes,6,opt,name=kernel_driver,json=kernelDriver,proto3" json:"kernel_driver,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The reply to the STNRequest. Contains the original config of the stolen interface.

func (*STNReply) Descriptor

func (*STNReply) Descriptor() ([]byte, []int)

func (*STNReply) GetError

func (m *STNReply) GetError() string

func (*STNReply) GetIpAddresses

func (m *STNReply) GetIpAddresses() []string

func (*STNReply) GetKernelDriver

func (m *STNReply) GetKernelDriver() string

func (*STNReply) GetPciAddress

func (m *STNReply) GetPciAddress() string

func (*STNReply) GetResult

func (m *STNReply) GetResult() uint32

func (*STNReply) GetRoutes

func (m *STNReply) GetRoutes() []*STNReply_Route

func (*STNReply) ProtoMessage

func (*STNReply) ProtoMessage()

func (*STNReply) Reset

func (m *STNReply) Reset()

func (*STNReply) String

func (m *STNReply) String() string

func (*STNReply) XXX_DiscardUnknown added in v1.4.0

func (m *STNReply) XXX_DiscardUnknown()

func (*STNReply) XXX_Marshal added in v1.4.0

func (m *STNReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*STNReply) XXX_Merge added in v1.4.0

func (m *STNReply) XXX_Merge(src proto.Message)

func (*STNReply) XXX_Size added in v1.4.0

func (m *STNReply) XXX_Size() int

func (*STNReply) XXX_Unmarshal added in v1.4.0

func (m *STNReply) XXX_Unmarshal(b []byte) error

type STNReply_Route

type STNReply_Route struct {
	// Destination subnet prefix.
	DestinationSubnet string `protobuf:"bytes,1,opt,name=destination_subnet,json=destinationSubnet,proto3" json:"destination_subnet,omitempty"`
	// Next hop IP address.
	NextHopIp            string   `protobuf:"bytes,2,opt,name=next_hop_ip,json=nextHopIp,proto3" json:"next_hop_ip,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

A route related to the interface.

func (*STNReply_Route) Descriptor

func (*STNReply_Route) Descriptor() ([]byte, []int)

func (*STNReply_Route) GetDestinationSubnet

func (m *STNReply_Route) GetDestinationSubnet() string

func (*STNReply_Route) GetNextHopIp

func (m *STNReply_Route) GetNextHopIp() string

func (*STNReply_Route) ProtoMessage

func (*STNReply_Route) ProtoMessage()

func (*STNReply_Route) Reset

func (m *STNReply_Route) Reset()

func (*STNReply_Route) String

func (m *STNReply_Route) String() string

func (*STNReply_Route) XXX_DiscardUnknown added in v1.4.0

func (m *STNReply_Route) XXX_DiscardUnknown()

func (*STNReply_Route) XXX_Marshal added in v1.4.0

func (m *STNReply_Route) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*STNReply_Route) XXX_Merge added in v1.4.0

func (m *STNReply_Route) XXX_Merge(src proto.Message)

func (*STNReply_Route) XXX_Size added in v1.4.0

func (m *STNReply_Route) XXX_Size() int

func (*STNReply_Route) XXX_Unmarshal added in v1.4.0

func (m *STNReply_Route) XXX_Unmarshal(b []byte) error

type STNRequest

type STNRequest struct {
	// The interface to be stolen / released.
	InterfaceName string `protobuf:"bytes,1,opt,name=interface_name,json=interfaceName,proto3" json:"interface_name,omitempty"`
	// True if DHCP is enabled on the interface.
	DhcpEnabled          bool     `protobuf:"varint,2,opt,name=dhcp_enabled,json=dhcpEnabled,proto3" json:"dhcp_enabled,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

STNRequest represents a request to steal or release of an interface.

func (*STNRequest) Descriptor

func (*STNRequest) Descriptor() ([]byte, []int)

func (*STNRequest) GetDhcpEnabled

func (m *STNRequest) GetDhcpEnabled() bool

func (*STNRequest) GetInterfaceName

func (m *STNRequest) GetInterfaceName() string

func (*STNRequest) ProtoMessage

func (*STNRequest) ProtoMessage()

func (*STNRequest) Reset

func (m *STNRequest) Reset()

func (*STNRequest) String

func (m *STNRequest) String() string

func (*STNRequest) XXX_DiscardUnknown added in v1.4.0

func (m *STNRequest) XXX_DiscardUnknown()

func (*STNRequest) XXX_Marshal added in v1.4.0

func (m *STNRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*STNRequest) XXX_Merge added in v1.4.0

func (m *STNRequest) XXX_Merge(src proto.Message)

func (*STNRequest) XXX_Size added in v1.4.0

func (m *STNRequest) XXX_Size() int

func (*STNRequest) XXX_Unmarshal added in v1.4.0

func (m *STNRequest) XXX_Unmarshal(b []byte) error

type STNServer

type STNServer interface {
	// The request to steal (unconfigure) an interface identified by its name.
	StealInterface(context.Context, *STNRequest) (*STNReply, error)
	// The request to revert config of a previously "stolen" (unconfigured) interface.
	ReleaseInterface(context.Context, *STNRequest) (*STNReply, error)
	// Request to return information about the stolen interface.
	StolenInterfaceInfo(context.Context, *STNRequest) (*STNReply, error)
}

STNServer is the server API for STN service.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL