Documentation ¶
Index ¶
- Variables
- func RegisterSysribServer(s grpc.ServiceRegistrar, srv SysribServer)
- type Nexthop
- func (*Nexthop) Descriptor() ([]byte, []int)deprecated
- func (x *Nexthop) GetAddress() string
- func (x *Nexthop) GetType() Nexthop_Type
- func (x *Nexthop) GetVrfId() uint32
- func (x *Nexthop) GetWeight() uint64
- func (*Nexthop) ProtoMessage()
- func (x *Nexthop) ProtoReflect() protoreflect.Message
- func (x *Nexthop) Reset()
- func (x *Nexthop) String() string
- type Nexthop_Type
- func (Nexthop_Type) Descriptor() protoreflect.EnumDescriptor
- func (x Nexthop_Type) Enum() *Nexthop_Type
- func (Nexthop_Type) EnumDescriptor() ([]byte, []int)deprecated
- func (x Nexthop_Type) Number() protoreflect.EnumNumber
- func (x Nexthop_Type) String() string
- func (Nexthop_Type) Type() protoreflect.EnumType
- type Prefix
- func (*Prefix) Descriptor() ([]byte, []int)deprecated
- func (x *Prefix) GetAddress() string
- func (x *Prefix) GetFamily() Prefix_Family
- func (x *Prefix) GetMaskLength() uint32
- func (*Prefix) ProtoMessage()
- func (x *Prefix) ProtoReflect() protoreflect.Message
- func (x *Prefix) Reset()
- func (x *Prefix) String() string
- type Prefix_Family
- func (Prefix_Family) Descriptor() protoreflect.EnumDescriptor
- func (x Prefix_Family) Enum() *Prefix_Family
- func (Prefix_Family) EnumDescriptor() ([]byte, []int)deprecated
- func (x Prefix_Family) Number() protoreflect.EnumNumber
- func (x Prefix_Family) String() string
- func (Prefix_Family) Type() protoreflect.EnumType
- type SetRouteRequest
- func (*SetRouteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SetRouteRequest) GetAdminDistance() uint32
- func (x *SetRouteRequest) GetBackupNexthops() []*Nexthop
- func (x *SetRouteRequest) GetDelete() bool
- func (x *SetRouteRequest) GetMetric() uint32
- func (x *SetRouteRequest) GetNexthops() []*Nexthop
- func (x *SetRouteRequest) GetPrefix() *Prefix
- func (x *SetRouteRequest) GetProtocolName() string
- func (x *SetRouteRequest) GetSafi() SetRouteRequest_Safi
- func (x *SetRouteRequest) GetVrfId() uint32
- func (*SetRouteRequest) ProtoMessage()
- func (x *SetRouteRequest) ProtoReflect() protoreflect.Message
- func (x *SetRouteRequest) Reset()
- func (x *SetRouteRequest) String() string
- type SetRouteRequest_Safi
- func (SetRouteRequest_Safi) Descriptor() protoreflect.EnumDescriptor
- func (x SetRouteRequest_Safi) Enum() *SetRouteRequest_Safi
- func (SetRouteRequest_Safi) EnumDescriptor() ([]byte, []int)deprecated
- func (x SetRouteRequest_Safi) Number() protoreflect.EnumNumber
- func (x SetRouteRequest_Safi) String() string
- func (SetRouteRequest_Safi) Type() protoreflect.EnumType
- type SetRouteResponse
- func (*SetRouteResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SetRouteResponse) GetStatus() SetRouteResponse_Status
- func (*SetRouteResponse) ProtoMessage()
- func (x *SetRouteResponse) ProtoReflect() protoreflect.Message
- func (x *SetRouteResponse) Reset()
- func (x *SetRouteResponse) String() string
- type SetRouteResponse_Status
- func (SetRouteResponse_Status) Descriptor() protoreflect.EnumDescriptor
- func (x SetRouteResponse_Status) Enum() *SetRouteResponse_Status
- func (SetRouteResponse_Status) EnumDescriptor() ([]byte, []int)deprecated
- func (x SetRouteResponse_Status) Number() protoreflect.EnumNumber
- func (x SetRouteResponse_Status) String() string
- func (SetRouteResponse_Status) Type() protoreflect.EnumType
- type SysribClient
- type SysribServer
- type UnimplementedSysribServer
- type UnsafeSysribServer
Constants ¶
This section is empty.
Variables ¶
var ( SetRouteRequest_Safi_name = map[int32]string{ 0: "SAFI_UNSPECIFIED", 1: "SAFI_UNICAST", } SetRouteRequest_Safi_value = map[string]int32{ "SAFI_UNSPECIFIED": 0, "SAFI_UNICAST": 1, } )
Enum value maps for SetRouteRequest_Safi.
var ( Prefix_Family_name = map[int32]string{ 0: "FAMILY_UNSPECIFIED", 1: "FAMILY_IPV4", 2: "FAMILY_IPV6", } Prefix_Family_value = map[string]int32{ "FAMILY_UNSPECIFIED": 0, "FAMILY_IPV4": 1, "FAMILY_IPV6": 2, } )
Enum value maps for Prefix_Family.
var ( Nexthop_Type_name = map[int32]string{ 0: "TYPE_UNSPECIFIED", 1: "TYPE_IPV4", 2: "TYPE_IPV6", } Nexthop_Type_value = map[string]int32{ "TYPE_UNSPECIFIED": 0, "TYPE_IPV4": 1, "TYPE_IPV6": 2, } )
Enum value maps for Nexthop_Type.
var ( SetRouteResponse_Status_name = map[int32]string{ 0: "STATUS_UNSPECIFIED", 1: "STATUS_SUCCESS", 2: "STATUS_FAIL", } SetRouteResponse_Status_value = map[string]int32{ "STATUS_UNSPECIFIED": 0, "STATUS_SUCCESS": 1, "STATUS_FAIL": 2, } )
Enum value maps for SetRouteResponse_Status.
var File_sysrib_proto protoreflect.FileDescriptor
var Sysrib_ServiceDesc = grpc.ServiceDesc{ ServiceName: "sysrib.Sysrib", HandlerType: (*SysribServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SetRoute", Handler: _Sysrib_SetRoute_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "sysrib.proto", }
Sysrib_ServiceDesc is the grpc.ServiceDesc for Sysrib service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterSysribServer ¶
func RegisterSysribServer(s grpc.ServiceRegistrar, srv SysribServer)
Types ¶
type Nexthop ¶
type Nexthop struct { VrfId uint32 `protobuf:"varint,1,opt,name=vrf_id,json=vrfId,proto3" json:"vrf_id,omitempty"` Type Nexthop_Type `protobuf:"varint,2,opt,name=type,proto3,enum=sysrib.Nexthop_Type" json:"type,omitempty"` //int32 ifindex = 3; Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` Weight uint64 `protobuf:"varint,4,opt,name=weight,proto3" json:"weight,omitempty"` // contains filtered or unexported fields }
func (*Nexthop) Descriptor
deprecated
func (*Nexthop) GetAddress ¶
func (*Nexthop) GetType ¶
func (x *Nexthop) GetType() Nexthop_Type
func (*Nexthop) ProtoMessage ¶
func (*Nexthop) ProtoMessage()
func (*Nexthop) ProtoReflect ¶
func (x *Nexthop) ProtoReflect() protoreflect.Message
type Nexthop_Type ¶
type Nexthop_Type int32
const ( Nexthop_TYPE_UNSPECIFIED Nexthop_Type = 0 Nexthop_TYPE_IPV4 Nexthop_Type = 1 Nexthop_TYPE_IPV6 Nexthop_Type = 2 )
func (Nexthop_Type) Descriptor ¶
func (Nexthop_Type) Descriptor() protoreflect.EnumDescriptor
func (Nexthop_Type) Enum ¶
func (x Nexthop_Type) Enum() *Nexthop_Type
func (Nexthop_Type) EnumDescriptor
deprecated
func (Nexthop_Type) EnumDescriptor() ([]byte, []int)
Deprecated: Use Nexthop_Type.Descriptor instead.
func (Nexthop_Type) Number ¶
func (x Nexthop_Type) Number() protoreflect.EnumNumber
func (Nexthop_Type) String ¶
func (x Nexthop_Type) String() string
func (Nexthop_Type) Type ¶
func (Nexthop_Type) Type() protoreflect.EnumType
type Prefix ¶
type Prefix struct { Family Prefix_Family `protobuf:"varint,1,opt,name=family,proto3,enum=sysrib.Prefix_Family" json:"family,omitempty"` Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` MaskLength uint32 `protobuf:"varint,3,opt,name=mask_length,json=maskLength,proto3" json:"mask_length,omitempty"` // contains filtered or unexported fields }
TODO(wenbli): This probably goes in some common proto file.
func (*Prefix) Descriptor
deprecated
func (*Prefix) GetAddress ¶
func (*Prefix) GetFamily ¶
func (x *Prefix) GetFamily() Prefix_Family
func (*Prefix) GetMaskLength ¶
func (*Prefix) ProtoMessage ¶
func (*Prefix) ProtoMessage()
func (*Prefix) ProtoReflect ¶
func (x *Prefix) ProtoReflect() protoreflect.Message
type Prefix_Family ¶
type Prefix_Family int32
const ( Prefix_FAMILY_UNSPECIFIED Prefix_Family = 0 Prefix_FAMILY_IPV4 Prefix_Family = 1 Prefix_FAMILY_IPV6 Prefix_Family = 2 )
func (Prefix_Family) Descriptor ¶
func (Prefix_Family) Descriptor() protoreflect.EnumDescriptor
func (Prefix_Family) Enum ¶
func (x Prefix_Family) Enum() *Prefix_Family
func (Prefix_Family) EnumDescriptor
deprecated
func (Prefix_Family) EnumDescriptor() ([]byte, []int)
Deprecated: Use Prefix_Family.Descriptor instead.
func (Prefix_Family) Number ¶
func (x Prefix_Family) Number() protoreflect.EnumNumber
func (Prefix_Family) String ¶
func (x Prefix_Family) String() string
func (Prefix_Family) Type ¶
func (Prefix_Family) Type() protoreflect.EnumType
type SetRouteRequest ¶
type SetRouteRequest struct { Delete bool `protobuf:"varint,1,opt,name=delete,proto3" json:"delete,omitempty"` VrfId uint32 `protobuf:"varint,2,opt,name=vrf_id,json=vrfId,proto3" json:"vrf_id,omitempty"` AdminDistance uint32 `protobuf:"varint,3,opt,name=admin_distance,json=adminDistance,proto3" json:"admin_distance,omitempty"` ProtocolName string `protobuf:"bytes,4,opt,name=protocol_name,json=protocolName,proto3" json:"protocol_name,omitempty"` Safi SetRouteRequest_Safi `protobuf:"varint,5,opt,name=safi,proto3,enum=sysrib.SetRouteRequest_Safi" json:"safi,omitempty"` Prefix *Prefix `protobuf:"bytes,6,opt,name=prefix,proto3" json:"prefix,omitempty"` Metric uint32 `protobuf:"varint,7,opt,name=metric,proto3" json:"metric,omitempty"` Nexthops []*Nexthop `protobuf:"bytes,8,rep,name=nexthops,proto3" json:"nexthops,omitempty"` BackupNexthops []*Nexthop `protobuf:"bytes,9,rep,name=backup_nexthops,json=backupNexthops,proto3" json:"backup_nexthops,omitempty"` // contains filtered or unexported fields }
SetRouteRequest and its dependent messages are derived from ZEBRA_ROUTE_ADD/ZEBRA_ROUTE_DELETE.
func (*SetRouteRequest) Descriptor
deprecated
func (*SetRouteRequest) Descriptor() ([]byte, []int)
Deprecated: Use SetRouteRequest.ProtoReflect.Descriptor instead.
func (*SetRouteRequest) GetAdminDistance ¶
func (x *SetRouteRequest) GetAdminDistance() uint32
func (*SetRouteRequest) GetBackupNexthops ¶
func (x *SetRouteRequest) GetBackupNexthops() []*Nexthop
func (*SetRouteRequest) GetDelete ¶
func (x *SetRouteRequest) GetDelete() bool
func (*SetRouteRequest) GetMetric ¶
func (x *SetRouteRequest) GetMetric() uint32
func (*SetRouteRequest) GetNexthops ¶
func (x *SetRouteRequest) GetNexthops() []*Nexthop
func (*SetRouteRequest) GetPrefix ¶
func (x *SetRouteRequest) GetPrefix() *Prefix
func (*SetRouteRequest) GetProtocolName ¶
func (x *SetRouteRequest) GetProtocolName() string
func (*SetRouteRequest) GetSafi ¶
func (x *SetRouteRequest) GetSafi() SetRouteRequest_Safi
func (*SetRouteRequest) GetVrfId ¶
func (x *SetRouteRequest) GetVrfId() uint32
func (*SetRouteRequest) ProtoMessage ¶
func (*SetRouteRequest) ProtoMessage()
func (*SetRouteRequest) ProtoReflect ¶
func (x *SetRouteRequest) ProtoReflect() protoreflect.Message
func (*SetRouteRequest) Reset ¶
func (x *SetRouteRequest) Reset()
func (*SetRouteRequest) String ¶
func (x *SetRouteRequest) String() string
type SetRouteRequest_Safi ¶
type SetRouteRequest_Safi int32
const ( SetRouteRequest_SAFI_UNSPECIFIED SetRouteRequest_Safi = 0 SetRouteRequest_SAFI_UNICAST SetRouteRequest_Safi = 1 //MULTICAST = 1; )
func (SetRouteRequest_Safi) Descriptor ¶
func (SetRouteRequest_Safi) Descriptor() protoreflect.EnumDescriptor
func (SetRouteRequest_Safi) Enum ¶
func (x SetRouteRequest_Safi) Enum() *SetRouteRequest_Safi
func (SetRouteRequest_Safi) EnumDescriptor
deprecated
func (SetRouteRequest_Safi) EnumDescriptor() ([]byte, []int)
Deprecated: Use SetRouteRequest_Safi.Descriptor instead.
func (SetRouteRequest_Safi) Number ¶
func (x SetRouteRequest_Safi) Number() protoreflect.EnumNumber
func (SetRouteRequest_Safi) String ¶
func (x SetRouteRequest_Safi) String() string
func (SetRouteRequest_Safi) Type ¶
func (SetRouteRequest_Safi) Type() protoreflect.EnumType
type SetRouteResponse ¶
type SetRouteResponse struct { Status SetRouteResponse_Status `protobuf:"varint,1,opt,name=status,proto3,enum=sysrib.SetRouteResponse_Status" json:"status,omitempty"` // tableid // contains filtered or unexported fields }
func (*SetRouteResponse) Descriptor
deprecated
func (*SetRouteResponse) Descriptor() ([]byte, []int)
Deprecated: Use SetRouteResponse.ProtoReflect.Descriptor instead.
func (*SetRouteResponse) GetStatus ¶
func (x *SetRouteResponse) GetStatus() SetRouteResponse_Status
func (*SetRouteResponse) ProtoMessage ¶
func (*SetRouteResponse) ProtoMessage()
func (*SetRouteResponse) ProtoReflect ¶
func (x *SetRouteResponse) ProtoReflect() protoreflect.Message
func (*SetRouteResponse) Reset ¶
func (x *SetRouteResponse) Reset()
func (*SetRouteResponse) String ¶
func (x *SetRouteResponse) String() string
type SetRouteResponse_Status ¶
type SetRouteResponse_Status int32
const ( SetRouteResponse_STATUS_UNSPECIFIED SetRouteResponse_Status = 0 SetRouteResponse_STATUS_SUCCESS SetRouteResponse_Status = 1 SetRouteResponse_STATUS_FAIL SetRouteResponse_Status = 2 )
func (SetRouteResponse_Status) Descriptor ¶
func (SetRouteResponse_Status) Descriptor() protoreflect.EnumDescriptor
func (SetRouteResponse_Status) Enum ¶
func (x SetRouteResponse_Status) Enum() *SetRouteResponse_Status
func (SetRouteResponse_Status) EnumDescriptor
deprecated
func (SetRouteResponse_Status) EnumDescriptor() ([]byte, []int)
Deprecated: Use SetRouteResponse_Status.Descriptor instead.
func (SetRouteResponse_Status) Number ¶
func (x SetRouteResponse_Status) Number() protoreflect.EnumNumber
func (SetRouteResponse_Status) String ¶
func (x SetRouteResponse_Status) String() string
func (SetRouteResponse_Status) Type ¶
func (SetRouteResponse_Status) Type() protoreflect.EnumType
type SysribClient ¶
type SysribClient interface {
SetRoute(ctx context.Context, in *SetRouteRequest, opts ...grpc.CallOption) (*SetRouteResponse, error)
}
SysribClient is the client API for Sysrib service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewSysribClient ¶
func NewSysribClient(cc grpc.ClientConnInterface) SysribClient
type SysribServer ¶
type SysribServer interface { SetRoute(context.Context, *SetRouteRequest) (*SetRouteResponse, error) // contains filtered or unexported methods }
SysribServer is the server API for Sysrib service. All implementations must embed UnimplementedSysribServer for forward compatibility
type UnimplementedSysribServer ¶
type UnimplementedSysribServer struct { }
UnimplementedSysribServer must be embedded to have forward compatible implementations.
func (UnimplementedSysribServer) SetRoute ¶
func (UnimplementedSysribServer) SetRoute(context.Context, *SetRouteRequest) (*SetRouteResponse, error)
type UnsafeSysribServer ¶
type UnsafeSysribServer interface {
// contains filtered or unexported methods
}
UnsafeSysribServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SysribServer will result in compilation errors.