Documentation
¶
Index ¶
- Variables
- func RegisterNetworkServiceServer(s *grpc.Server, srv NetworkServiceServer)
- type AddressFamily
- type Interface
- func (*Interface) Descriptor() ([]byte, []int)
- func (m *Interface) GetFlags() InterfaceFlags
- func (m *Interface) GetHardwareaddr() string
- func (m *Interface) GetIndex() uint32
- func (m *Interface) GetIpaddress() []string
- func (m *Interface) GetMtu() uint32
- func (m *Interface) GetName() string
- func (*Interface) ProtoMessage()
- func (m *Interface) Reset()
- func (m *Interface) String() string
- func (m *Interface) XXX_DiscardUnknown()
- func (m *Interface) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Interface) XXX_Merge(src proto.Message)
- func (m *Interface) XXX_Size() int
- func (m *Interface) XXX_Unmarshal(b []byte) error
- type InterfaceFlags
- type Interfaces
- func (*Interfaces) Descriptor() ([]byte, []int)
- func (m *Interfaces) GetInterfaces() []*Interface
- func (m *Interfaces) GetMetadata() *common.Metadata
- func (*Interfaces) ProtoMessage()
- func (m *Interfaces) Reset()
- func (m *Interfaces) String() string
- func (m *Interfaces) XXX_DiscardUnknown()
- func (m *Interfaces) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Interfaces) XXX_Merge(src proto.Message)
- func (m *Interfaces) XXX_Size() int
- func (m *Interfaces) XXX_Unmarshal(b []byte) error
- type InterfacesResponse
- func (*InterfacesResponse) Descriptor() ([]byte, []int)
- func (m *InterfacesResponse) GetMessages() []*Interfaces
- func (*InterfacesResponse) ProtoMessage()
- func (m *InterfacesResponse) Reset()
- func (m *InterfacesResponse) String() string
- func (m *InterfacesResponse) XXX_DiscardUnknown()
- func (m *InterfacesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *InterfacesResponse) XXX_Merge(src proto.Message)
- func (m *InterfacesResponse) XXX_Size() int
- func (m *InterfacesResponse) XXX_Unmarshal(b []byte) error
- type NetworkServiceClient
- type NetworkServiceServer
- type Route
- func (*Route) Descriptor() ([]byte, []int)
- func (m *Route) GetDestination() string
- func (m *Route) GetFamily() AddressFamily
- func (m *Route) GetFlags() uint32
- func (m *Route) GetGateway() string
- func (m *Route) GetInterface() string
- func (m *Route) GetMetric() uint32
- func (m *Route) GetProtocol() RouteProtocol
- func (m *Route) GetScope() uint32
- func (m *Route) GetSource() string
- func (*Route) ProtoMessage()
- func (m *Route) Reset()
- func (m *Route) String() string
- func (m *Route) XXX_DiscardUnknown()
- func (m *Route) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Route) XXX_Merge(src proto.Message)
- func (m *Route) XXX_Size() int
- func (m *Route) XXX_Unmarshal(b []byte) error
- type RouteProtocol
- type Routes
- func (*Routes) Descriptor() ([]byte, []int)
- func (m *Routes) GetMetadata() *common.Metadata
- func (m *Routes) GetRoutes() []*Route
- func (*Routes) ProtoMessage()
- func (m *Routes) Reset()
- func (m *Routes) String() string
- func (m *Routes) XXX_DiscardUnknown()
- func (m *Routes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Routes) XXX_Merge(src proto.Message)
- func (m *Routes) XXX_Size() int
- func (m *Routes) XXX_Unmarshal(b []byte) error
- type RoutesResponse
- func (*RoutesResponse) Descriptor() ([]byte, []int)
- func (m *RoutesResponse) GetMessages() []*Routes
- func (*RoutesResponse) ProtoMessage()
- func (m *RoutesResponse) Reset()
- func (m *RoutesResponse) String() string
- func (m *RoutesResponse) XXX_DiscardUnknown()
- func (m *RoutesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RoutesResponse) XXX_Merge(src proto.Message)
- func (m *RoutesResponse) XXX_Size() int
- func (m *RoutesResponse) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var AddressFamily_name = map[int32]string{
0: "AF_UNSPEC",
2: "AF_INET",
10: "AF_INET6",
}
View Source
var AddressFamily_value = map[string]int32{
"AF_UNSPEC": 0,
"AF_INET": 2,
"IPV4": 2,
"AF_INET6": 10,
"IPV6": 10,
}
View Source
var InterfaceFlags_name = map[int32]string{
0: "FLAG_UNKNOWN",
1: "FLAG_UP",
2: "FLAG_BROADCAST",
3: "FLAG_LOOPBACK",
4: "FLAG_POINT_TO_POINT",
5: "FLAG_MULTICAST",
}
View Source
var InterfaceFlags_value = map[string]int32{
"FLAG_UNKNOWN": 0,
"FLAG_UP": 1,
"FLAG_BROADCAST": 2,
"FLAG_LOOPBACK": 3,
"FLAG_POINT_TO_POINT": 4,
"FLAG_MULTICAST": 5,
}
View Source
var RouteProtocol_name = map[int32]string{
0: "RTPROT_UNSPEC",
1: "RTPROT_REDIRECT",
2: "RTPROT_KERNEL",
3: "RTPROT_BOOT",
4: "RTPROT_STATIC",
8: "RTPROT_GATED",
9: "RTPROT_RA",
10: "RTPROT_MRT",
11: "RTPROT_ZEBRA",
12: "RTPROT_BIRD",
13: "RTPROT_DNROUTED",
14: "RTPROT_XORP",
15: "RTPROT_NTK",
16: "RTPROT_DHCP",
17: "RTPROT_MROUTED",
42: "RTPROT_BABEL",
}
View Source
var RouteProtocol_value = map[string]int32{
"RTPROT_UNSPEC": 0,
"RTPROT_REDIRECT": 1,
"RTPROT_KERNEL": 2,
"RTPROT_BOOT": 3,
"RTPROT_STATIC": 4,
"RTPROT_GATED": 8,
"RTPROT_RA": 9,
"RTPROT_MRT": 10,
"RTPROT_ZEBRA": 11,
"RTPROT_BIRD": 12,
"RTPROT_DNROUTED": 13,
"RTPROT_XORP": 14,
"RTPROT_NTK": 15,
"RTPROT_DHCP": 16,
"RTPROT_MROUTED": 17,
"RTPROT_BABEL": 42,
}
Functions ¶
func RegisterNetworkServiceServer ¶
func RegisterNetworkServiceServer(s *grpc.Server, srv NetworkServiceServer)
Types ¶
type AddressFamily ¶
type AddressFamily int32
const ( AddressFamily_AF_UNSPEC AddressFamily = 0 AddressFamily_AF_INET AddressFamily = 2 AddressFamily_IPV4 AddressFamily = 2 AddressFamily_AF_INET6 AddressFamily = 10 AddressFamily_IPV6 AddressFamily = 10 )
func (AddressFamily) EnumDescriptor ¶
func (AddressFamily) EnumDescriptor() ([]byte, []int)
func (AddressFamily) String ¶
func (x AddressFamily) String() string
type Interface ¶
type Interface struct { Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` Mtu uint32 `protobuf:"varint,2,opt,name=mtu,proto3" json:"mtu,omitempty"` Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` Hardwareaddr string `protobuf:"bytes,4,opt,name=hardwareaddr,proto3" json:"hardwareaddr,omitempty"` Flags InterfaceFlags `protobuf:"varint,5,opt,name=flags,proto3,enum=network.InterfaceFlags" json:"flags,omitempty"` Ipaddress []string `protobuf:"bytes,6,rep,name=ipaddress,proto3" json:"ipaddress,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Interface represents a net.Interface
func (*Interface) Descriptor ¶
func (*Interface) GetFlags ¶
func (m *Interface) GetFlags() InterfaceFlags
func (*Interface) GetHardwareaddr ¶
func (*Interface) GetIpaddress ¶
func (*Interface) ProtoMessage ¶
func (*Interface) ProtoMessage()
func (*Interface) XXX_DiscardUnknown ¶
func (m *Interface) XXX_DiscardUnknown()
func (*Interface) XXX_Marshal ¶
func (*Interface) XXX_Unmarshal ¶
type InterfaceFlags ¶
type InterfaceFlags int32
const ( InterfaceFlags_FLAG_UNKNOWN InterfaceFlags = 0 InterfaceFlags_FLAG_UP InterfaceFlags = 1 InterfaceFlags_FLAG_BROADCAST InterfaceFlags = 2 InterfaceFlags_FLAG_LOOPBACK InterfaceFlags = 3 InterfaceFlags_FLAG_POINT_TO_POINT InterfaceFlags = 4 InterfaceFlags_FLAG_MULTICAST InterfaceFlags = 5 )
func (InterfaceFlags) EnumDescriptor ¶
func (InterfaceFlags) EnumDescriptor() ([]byte, []int)
func (InterfaceFlags) String ¶
func (x InterfaceFlags) String() string
type Interfaces ¶
type Interfaces struct { Metadata *common.Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` Interfaces []*Interface `protobuf:"bytes,2,rep,name=interfaces,proto3" json:"interfaces,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Interfaces) Descriptor ¶
func (*Interfaces) Descriptor() ([]byte, []int)
func (*Interfaces) GetInterfaces ¶
func (m *Interfaces) GetInterfaces() []*Interface
func (*Interfaces) GetMetadata ¶
func (m *Interfaces) GetMetadata() *common.Metadata
func (*Interfaces) ProtoMessage ¶
func (*Interfaces) ProtoMessage()
func (*Interfaces) Reset ¶
func (m *Interfaces) Reset()
func (*Interfaces) String ¶
func (m *Interfaces) String() string
func (*Interfaces) XXX_DiscardUnknown ¶
func (m *Interfaces) XXX_DiscardUnknown()
func (*Interfaces) XXX_Marshal ¶
func (m *Interfaces) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Interfaces) XXX_Merge ¶
func (m *Interfaces) XXX_Merge(src proto.Message)
func (*Interfaces) XXX_Size ¶
func (m *Interfaces) XXX_Size() int
func (*Interfaces) XXX_Unmarshal ¶
func (m *Interfaces) XXX_Unmarshal(b []byte) error
type InterfacesResponse ¶
type InterfacesResponse struct { Messages []*Interfaces `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*InterfacesResponse) Descriptor ¶
func (*InterfacesResponse) Descriptor() ([]byte, []int)
func (*InterfacesResponse) GetMessages ¶
func (m *InterfacesResponse) GetMessages() []*Interfaces
func (*InterfacesResponse) ProtoMessage ¶
func (*InterfacesResponse) ProtoMessage()
func (*InterfacesResponse) Reset ¶
func (m *InterfacesResponse) Reset()
func (*InterfacesResponse) String ¶
func (m *InterfacesResponse) String() string
func (*InterfacesResponse) XXX_DiscardUnknown ¶
func (m *InterfacesResponse) XXX_DiscardUnknown()
func (*InterfacesResponse) XXX_Marshal ¶
func (m *InterfacesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*InterfacesResponse) XXX_Merge ¶
func (m *InterfacesResponse) XXX_Merge(src proto.Message)
func (*InterfacesResponse) XXX_Size ¶
func (m *InterfacesResponse) XXX_Size() int
func (*InterfacesResponse) XXX_Unmarshal ¶
func (m *InterfacesResponse) XXX_Unmarshal(b []byte) error
type NetworkServiceClient ¶
type NetworkServiceClient interface { Routes(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*RoutesResponse, error) Interfaces(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*InterfacesResponse, error) }
NetworkServiceClient is the client API for NetworkService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewNetworkServiceClient ¶
func NewNetworkServiceClient(cc *grpc.ClientConn) NetworkServiceClient
type NetworkServiceServer ¶
type NetworkServiceServer interface { Routes(context.Context, *empty.Empty) (*RoutesResponse, error) Interfaces(context.Context, *empty.Empty) (*InterfacesResponse, error) }
NetworkServiceServer is the server API for NetworkService service.
type Route ¶
type Route struct { // Interface is the interface over which traffic to this destination should be sent Interface string `protobuf:"bytes,1,opt,name=interface,proto3" json:"interface,omitempty"` // Destination is the network prefix CIDR which this route provides Destination string `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"` // Gateway is the gateway address to which traffic to this destination should be sent Gateway string `protobuf:"bytes,3,opt,name=gateway,proto3" json:"gateway,omitempty"` // Metric is the priority of the route, where lower metrics have higher priorities Metric uint32 `protobuf:"varint,4,opt,name=metric,proto3" json:"metric,omitempty"` // Scope desribes the scope of this route Scope uint32 `protobuf:"varint,5,opt,name=scope,proto3" json:"scope,omitempty"` // Source is the source prefix CIDR for the route, if one is defined Source string `protobuf:"bytes,6,opt,name=source,proto3" json:"source,omitempty"` // Family is the address family of the route. Currently, the only options are AF_INET (IPV4) and AF_INET6 (IPV6). Family AddressFamily `protobuf:"varint,7,opt,name=family,proto3,enum=network.AddressFamily" json:"family,omitempty"` // Protocol is the protocol by which this route came to be in place Protocol RouteProtocol `protobuf:"varint,8,opt,name=protocol,proto3,enum=network.RouteProtocol" json:"protocol,omitempty"` // Flags indicate any special flags on the route Flags uint32 `protobuf:"varint,9,opt,name=flags,proto3" json:"flags,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The messages message containing a route.
func (*Route) Descriptor ¶
func (*Route) GetDestination ¶
func (*Route) GetFamily ¶
func (m *Route) GetFamily() AddressFamily
func (*Route) GetGateway ¶
func (*Route) GetInterface ¶
func (*Route) GetProtocol ¶
func (m *Route) GetProtocol() RouteProtocol
func (*Route) ProtoMessage ¶
func (*Route) ProtoMessage()
func (*Route) XXX_DiscardUnknown ¶
func (m *Route) XXX_DiscardUnknown()
func (*Route) XXX_Marshal ¶
func (*Route) XXX_Unmarshal ¶
type RouteProtocol ¶
type RouteProtocol int32
const ( RouteProtocol_RTPROT_UNSPEC RouteProtocol = 0 RouteProtocol_RTPROT_REDIRECT RouteProtocol = 1 RouteProtocol_RTPROT_KERNEL RouteProtocol = 2 RouteProtocol_RTPROT_BOOT RouteProtocol = 3 RouteProtocol_RTPROT_STATIC RouteProtocol = 4 RouteProtocol_RTPROT_GATED RouteProtocol = 8 RouteProtocol_RTPROT_RA RouteProtocol = 9 RouteProtocol_RTPROT_MRT RouteProtocol = 10 RouteProtocol_RTPROT_ZEBRA RouteProtocol = 11 RouteProtocol_RTPROT_BIRD RouteProtocol = 12 RouteProtocol_RTPROT_DNROUTED RouteProtocol = 13 RouteProtocol_RTPROT_XORP RouteProtocol = 14 RouteProtocol_RTPROT_NTK RouteProtocol = 15 RouteProtocol_RTPROT_DHCP RouteProtocol = 16 RouteProtocol_RTPROT_MROUTED RouteProtocol = 17 RouteProtocol_RTPROT_BABEL RouteProtocol = 42 )
func (RouteProtocol) EnumDescriptor ¶
func (RouteProtocol) EnumDescriptor() ([]byte, []int)
func (RouteProtocol) String ¶
func (x RouteProtocol) String() string
type Routes ¶
type Routes struct { Metadata *common.Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` Routes []*Route `protobuf:"bytes,2,rep,name=routes,proto3" json:"routes,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Routes) Descriptor ¶
func (*Routes) GetMetadata ¶
func (*Routes) ProtoMessage ¶
func (*Routes) ProtoMessage()
func (*Routes) XXX_DiscardUnknown ¶
func (m *Routes) XXX_DiscardUnknown()
func (*Routes) XXX_Marshal ¶
func (*Routes) XXX_Unmarshal ¶
type RoutesResponse ¶
type RoutesResponse struct { Messages []*Routes `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The messages message containing the routes.
func (*RoutesResponse) Descriptor ¶
func (*RoutesResponse) Descriptor() ([]byte, []int)
func (*RoutesResponse) GetMessages ¶
func (m *RoutesResponse) GetMessages() []*Routes
func (*RoutesResponse) ProtoMessage ¶
func (*RoutesResponse) ProtoMessage()
func (*RoutesResponse) Reset ¶
func (m *RoutesResponse) Reset()
func (*RoutesResponse) String ¶
func (m *RoutesResponse) String() string
func (*RoutesResponse) XXX_DiscardUnknown ¶
func (m *RoutesResponse) XXX_DiscardUnknown()
func (*RoutesResponse) XXX_Marshal ¶
func (m *RoutesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RoutesResponse) XXX_Merge ¶
func (m *RoutesResponse) XXX_Merge(src proto.Message)
func (*RoutesResponse) XXX_Size ¶
func (m *RoutesResponse) XXX_Size() int
func (*RoutesResponse) XXX_Unmarshal ¶
func (m *RoutesResponse) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.