Documentation ¶
Overview ¶
Package stn is a generated protocol buffer package.
Package stn defines STN (Steal the NIC) GRPC service.
It is generated from these files:
stn.proto
It has these top-level messages:
STNRequest STNReply
Index ¶
- func RegisterSTNServer(s *grpc.Server, srv STNServer)
- type STNClient
- type STNReply
- func (*STNReply) Descriptor() ([]byte, []int)
- func (m *STNReply) GetError() string
- func (m *STNReply) GetIpAddresses() []string
- func (m *STNReply) GetPciAddress() string
- func (m *STNReply) GetResult() uint32
- func (m *STNReply) GetRoutes() []*STNReply_Route
- func (*STNReply) ProtoMessage()
- func (m *STNReply) Reset()
- func (m *STNReply) String() string
- type STNReply_Route
- type STNRequest
- type STNServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterSTNServer ¶
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) }
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" json:"result,omitempty"` // Error string in case that result != 0. Error string `protobuf:"bytes,2,opt,name=error" json:"error,omitempty"` // PCI address of the interface. PciAddress string `protobuf:"bytes,3,opt,name=pci_address,json=pciAddress" json:"pci_address,omitempty"` // List of IP addresses assigned to the interface. IpAddresses []string `protobuf:"bytes,4,rep,name=ip_addresses,json=ipAddresses" json:"ip_addresses,omitempty"` // List of routes related to the interface. Routes []*STNReply_Route `protobuf:"bytes,5,rep,name=routes" json:"routes,omitempty"` }
The reply to the STNRequest. Contians the original config of the stolen interface.
func (*STNReply) Descriptor ¶
func (*STNReply) GetIpAddresses ¶
func (*STNReply) GetPciAddress ¶
func (*STNReply) GetRoutes ¶
func (m *STNReply) GetRoutes() []*STNReply_Route
func (*STNReply) ProtoMessage ¶
func (*STNReply) ProtoMessage()
type STNReply_Route ¶
type STNReply_Route struct { // Destination subnet prefix. DestinationSubnet string `protobuf:"bytes,1,opt,name=destination_subnet,json=destinationSubnet" json:"destination_subnet,omitempty"` // Next hop IP address. NextHopIp string `protobuf:"bytes,2,opt,name=next_hop_ip,json=nextHopIp" json:"next_hop_ip,omitempty"` }
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
type STNRequest ¶
type STNRequest struct { // The interface to be stolen / released. InterfaceName string `protobuf:"bytes,1,opt,name=interface_name,json=interfaceName" json:"interface_name,omitempty"` // True if DHCP is enabled on the interface. DhcpEnabled bool `protobuf:"varint,2,opt,name=dhcp_enabled,json=dhcpEnabled" json:"dhcp_enabled,omitempty"` }
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
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) }
Click to show internal directories.
Click to hide internal directories.