controller

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Controller_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "controller.Controller",
	HandlerType: (*ControllerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetConfig",
			Handler:    _Controller_GetConfig_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "controller.proto",
}

Controller_ServiceDesc is the grpc.ServiceDesc for Controller 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_controller_proto protoreflect.FileDescriptor

Functions

func RegisterControllerServer

func RegisterControllerServer(s grpc.ServiceRegistrar, srv ControllerServer)

Types

type BgpPeers

type BgpPeers struct {
	Peers []string `protobuf:"bytes,1,rep,name=peers,proto3" json:"peers,omitempty"`
	// contains filtered or unexported fields
}

Represents a list of BGP peers

func (*BgpPeers) Descriptor deprecated

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

Deprecated: Use BgpPeers.ProtoReflect.Descriptor instead.

func (*BgpPeers) GetPeers

func (x *BgpPeers) GetPeers() []string

func (*BgpPeers) ProtoMessage

func (*BgpPeers) ProtoMessage()

func (*BgpPeers) ProtoReflect

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

func (*BgpPeers) Reset

func (x *BgpPeers) Reset()

func (*BgpPeers) String

func (x *BgpPeers) String() string

type ConfigRequest

type ConfigRequest struct {
	Pubkey        string               `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
	BgpPeers      []string             `protobuf:"bytes,2,rep,name=bgp_peers,json=bgpPeers,proto3" json:"bgp_peers,omitempty"`
	Hash          string               `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"`
	BgpPeersByVrf map[string]*BgpPeers `` /* 192-byte string literal not displayed */
	// contains filtered or unexported fields
}

Request for latest configuration of a DoubleZero node based on its public key

func (*ConfigRequest) Descriptor deprecated

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

Deprecated: Use ConfigRequest.ProtoReflect.Descriptor instead.

func (*ConfigRequest) GetBgpPeers

func (x *ConfigRequest) GetBgpPeers() []string

func (*ConfigRequest) GetBgpPeersByVrf

func (x *ConfigRequest) GetBgpPeersByVrf() map[string]*BgpPeers

func (*ConfigRequest) GetHash

func (x *ConfigRequest) GetHash() string

func (*ConfigRequest) GetPubkey

func (x *ConfigRequest) GetPubkey() string

func (*ConfigRequest) ProtoMessage

func (*ConfigRequest) ProtoMessage()

func (*ConfigRequest) ProtoReflect

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

func (*ConfigRequest) Reset

func (x *ConfigRequest) Reset()

func (*ConfigRequest) String

func (x *ConfigRequest) String() string

type ConfigResponse

type ConfigResponse struct {
	Config string `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
	Hash   string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
	// contains filtered or unexported fields
}

Response containing the latest configuration of a DoubleZero node

func (*ConfigResponse) Descriptor deprecated

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

Deprecated: Use ConfigResponse.ProtoReflect.Descriptor instead.

func (*ConfigResponse) GetConfig

func (x *ConfigResponse) GetConfig() string

func (*ConfigResponse) GetHash

func (x *ConfigResponse) GetHash() string

func (*ConfigResponse) ProtoMessage

func (*ConfigResponse) ProtoMessage()

func (*ConfigResponse) ProtoReflect

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

func (*ConfigResponse) Reset

func (x *ConfigResponse) Reset()

func (*ConfigResponse) String

func (x *ConfigResponse) String() string

type ControllerClient

type ControllerClient interface {
	// Returns the latest configuration of a DoubleZero node based on on-chain data
	GetConfig(ctx context.Context, in *ConfigRequest, opts ...grpc.CallOption) (*ConfigResponse, error)
}

ControllerClient is the client API for Controller 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 NewControllerClient

func NewControllerClient(cc grpc.ClientConnInterface) ControllerClient

type ControllerServer

type ControllerServer interface {
	// Returns the latest configuration of a DoubleZero node based on on-chain data
	GetConfig(context.Context, *ConfigRequest) (*ConfigResponse, error)
}

ControllerServer is the server API for Controller service. All implementations should embed UnimplementedControllerServer for forward compatibility

type UnimplementedControllerServer

type UnimplementedControllerServer struct {
}

UnimplementedControllerServer should be embedded to have forward compatible implementations.

func (UnimplementedControllerServer) GetConfig

type UnsafeControllerServer

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

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

Jump to

Keyboard shortcuts

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