bfd

package
v0.0.0-...-ae01f8c Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const ModuleName = "vpp.bfd"

Variables

View Source
var (
	BFDEvent_SessionState_name = map[int32]string{
		0: "Unknown",
		1: "Down",
		2: "Init",
		3: "Up",
	}
	BFDEvent_SessionState_value = map[string]int32{
		"Unknown": 0,
		"Down":    1,
		"Init":    2,
		"Up":      3,
	}
)

Enum value maps for BFDEvent_SessionState.

View Source
var BFDWatcher_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "bfd.BFDWatcher",
	HandlerType: (*BFDWatcherServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "WatchBFDEvents",
			Handler:       _BFDWatcher_WatchBFDEvents_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "bfd/bfd.proto",
}

BFDWatcher_ServiceDesc is the grpc.ServiceDesc for BFDWatcher service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_bfd_bfd_proto protoreflect.FileDescriptor

Functions

func BFDKey

func BFDKey(ifName, peerIP string) string

BFDKey returns key for the given BFD configuration.

func RegisterBFDWatcherServer

func RegisterBFDWatcherServer(s grpc.ServiceRegistrar, srv BFDWatcherServer)

Types

type BFD

type BFD struct {

	// Name of the interface the BFD session is attached to.
	Interface string `protobuf:"bytes,1,opt,name=interface,proto3" json:"interface,omitempty"`
	// Local IP address. The interface must have the same address configured.
	LocalIp string `protobuf:"bytes,2,opt,name=local_ip,json=localIp,proto3" json:"local_ip,omitempty"`
	// IP address of the peer, must be the same IP version as the local address.
	PeerIp string `protobuf:"bytes,3,opt,name=peer_ip,json=peerIp,proto3" json:"peer_ip,omitempty"`
	// Desired minimum TX interval in milliseconds.
	MinTxInterval uint32 `protobuf:"varint,4,opt,name=min_tx_interval,json=minTxInterval,proto3" json:"min_tx_interval,omitempty"`
	// Required minimum RX interval in milliseconds.
	MinRxInterval uint32 `protobuf:"varint,5,opt,name=min_rx_interval,json=minRxInterval,proto3" json:"min_rx_interval,omitempty"`
	// Detect multiplier, must be non-zero value.
	DetectMultiplier uint32 `protobuf:"varint,6,opt,name=detect_multiplier,json=detectMultiplier,proto3" json:"detect_multiplier,omitempty"`
	// contains filtered or unexported fields
}

Single-hop UDP-based bidirectional forwarding detection session

func (*BFD) Descriptor deprecated

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

Deprecated: Use BFD.ProtoReflect.Descriptor instead.

func (*BFD) GetDetectMultiplier

func (x *BFD) GetDetectMultiplier() uint32

func (*BFD) GetInterface

func (x *BFD) GetInterface() string

func (*BFD) GetLocalIp

func (x *BFD) GetLocalIp() string

func (*BFD) GetMinRxInterval

func (x *BFD) GetMinRxInterval() uint32

func (*BFD) GetMinTxInterval

func (x *BFD) GetMinTxInterval() uint32

func (*BFD) GetPeerIp

func (x *BFD) GetPeerIp() string

func (*BFD) ProtoMessage

func (*BFD) ProtoMessage()

func (*BFD) ProtoReflect

func (x *BFD) ProtoReflect() protoreflect.Message

func (*BFD) Reset

func (x *BFD) Reset()

func (*BFD) String

func (x *BFD) String() string

type BFDEvent

type BFDEvent struct {
	Interface    string                `protobuf:"bytes,1,opt,name=interface,proto3" json:"interface,omitempty"`
	LocalIp      string                `protobuf:"bytes,2,opt,name=local_ip,json=localIp,proto3" json:"local_ip,omitempty"`
	PeerIp       string                `protobuf:"bytes,3,opt,name=peer_ip,json=peerIp,proto3" json:"peer_ip,omitempty"`
	SessionState BFDEvent_SessionState `` /* 129-byte string literal not displayed */
	// contains filtered or unexported fields
}

BFDEvent is generated whenever a BFD state changes.

func (*BFDEvent) Descriptor deprecated

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

Deprecated: Use BFDEvent.ProtoReflect.Descriptor instead.

func (*BFDEvent) GetInterface

func (x *BFDEvent) GetInterface() string

func (*BFDEvent) GetLocalIp

func (x *BFDEvent) GetLocalIp() string

func (*BFDEvent) GetPeerIp

func (x *BFDEvent) GetPeerIp() string

func (*BFDEvent) GetSessionState

func (x *BFDEvent) GetSessionState() BFDEvent_SessionState

func (*BFDEvent) ProtoMessage

func (*BFDEvent) ProtoMessage()

func (*BFDEvent) ProtoReflect

func (x *BFDEvent) ProtoReflect() protoreflect.Message

func (*BFDEvent) Reset

func (x *BFDEvent) Reset()

func (*BFDEvent) String

func (x *BFDEvent) String() string

type BFDEvent_SessionState

type BFDEvent_SessionState int32
const (
	BFDEvent_Unknown BFDEvent_SessionState = 0
	BFDEvent_Down    BFDEvent_SessionState = 1
	BFDEvent_Init    BFDEvent_SessionState = 2
	BFDEvent_Up      BFDEvent_SessionState = 3
)

func (BFDEvent_SessionState) Descriptor

func (BFDEvent_SessionState) Enum

func (BFDEvent_SessionState) EnumDescriptor deprecated

func (BFDEvent_SessionState) EnumDescriptor() ([]byte, []int)

Deprecated: Use BFDEvent_SessionState.Descriptor instead.

func (BFDEvent_SessionState) Number

func (BFDEvent_SessionState) String

func (x BFDEvent_SessionState) String() string

func (BFDEvent_SessionState) Type

type BFDWatcherClient

type BFDWatcherClient interface {
	// WatchBFDEvents allows to subscribe for BFD events.
	WatchBFDEvents(ctx context.Context, in *WatchBFDEventsRequest, opts ...grpc.CallOption) (BFDWatcher_WatchBFDEventsClient, error)
}

BFDWatcherClient is the client API for BFDWatcher 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 NewBFDWatcherClient

func NewBFDWatcherClient(cc grpc.ClientConnInterface) BFDWatcherClient

type BFDWatcherServer

type BFDWatcherServer interface {
	// WatchBFDEvents allows to subscribe for BFD events.
	WatchBFDEvents(*WatchBFDEventsRequest, BFDWatcher_WatchBFDEventsServer) error
	// contains filtered or unexported methods
}

BFDWatcherServer is the server API for BFDWatcher service. All implementations must embed UnimplementedBFDWatcherServer for forward compatibility

type BFDWatcher_WatchBFDEventsClient

type BFDWatcher_WatchBFDEventsClient interface {
	Recv() (*BFDEvent, error)
	grpc.ClientStream
}

type BFDWatcher_WatchBFDEventsServer

type BFDWatcher_WatchBFDEventsServer interface {
	Send(*BFDEvent) error
	grpc.ServerStream
}

type UnimplementedBFDWatcherServer

type UnimplementedBFDWatcherServer struct {
}

UnimplementedBFDWatcherServer must be embedded to have forward compatible implementations.

func (UnimplementedBFDWatcherServer) WatchBFDEvents

type UnsafeBFDWatcherServer

type UnsafeBFDWatcherServer interface {
	// contains filtered or unexported methods
}

UnsafeBFDWatcherServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BFDWatcherServer will result in compilation errors.

type WatchBFDEventsRequest

type WatchBFDEventsRequest struct {
	SubscriptionLabel string `protobuf:"bytes,1,opt,name=subscription_label,json=subscriptionLabel,proto3" json:"subscription_label,omitempty"`
	// contains filtered or unexported fields
}

Request message for the WatchBFDEvents method.

func (*WatchBFDEventsRequest) Descriptor deprecated

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

Deprecated: Use WatchBFDEventsRequest.ProtoReflect.Descriptor instead.

func (*WatchBFDEventsRequest) GetSubscriptionLabel

func (x *WatchBFDEventsRequest) GetSubscriptionLabel() string

func (*WatchBFDEventsRequest) ProtoMessage

func (*WatchBFDEventsRequest) ProtoMessage()

func (*WatchBFDEventsRequest) ProtoReflect

func (x *WatchBFDEventsRequest) ProtoReflect() protoreflect.Message

func (*WatchBFDEventsRequest) Reset

func (x *WatchBFDEventsRequest) Reset()

func (*WatchBFDEventsRequest) String

func (x *WatchBFDEventsRequest) String() string

Jump to

Keyboard shortcuts

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