control

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Control_Ping_FullMethodName     = "/control.Control/Ping"
	Control_Announce_FullMethodName = "/control.Control/Announce"
)

Variables

View Source
var Control_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "control.Control",
	HandlerType: (*ControlServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Ping",
			Handler:    _Control_Ping_Handler,
		},
		{
			MethodName: "Announce",
			Handler:    _Control_Announce_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "pkg/transport/proto/control/control.proto",
}

Control_ServiceDesc is the grpc.ServiceDesc for Control 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_pkg_transport_proto_control_control_proto protoreflect.FileDescriptor

Functions

func RegisterControlServer

func RegisterControlServer(s grpc.ServiceRegistrar, srv ControlServer)

Types

type AnnounceReply

type AnnounceReply struct {
	// contains filtered or unexported fields
}

func (*AnnounceReply) Descriptor deprecated

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

Deprecated: Use AnnounceReply.ProtoReflect.Descriptor instead.

func (*AnnounceReply) ProtoMessage

func (*AnnounceReply) ProtoMessage()

func (*AnnounceReply) ProtoReflect

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

func (*AnnounceReply) Reset

func (x *AnnounceReply) Reset()

func (*AnnounceReply) String

func (x *AnnounceReply) String() string

type AnnounceRequest

type AnnounceRequest struct {
	Ip      string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`                           // announcer's new address (global IPv6)
	TcpPort uint32 `protobuf:"varint,2,opt,name=tcp_port,json=tcpPort,proto3" json:"tcp_port,omitempty"` // announcer's TCP inbound port (UDP control reuses the number)
	// contains filtered or unexported fields
}

func (*AnnounceRequest) Descriptor deprecated

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

Deprecated: Use AnnounceRequest.ProtoReflect.Descriptor instead.

func (*AnnounceRequest) GetIp

func (x *AnnounceRequest) GetIp() string

func (*AnnounceRequest) GetTcpPort

func (x *AnnounceRequest) GetTcpPort() uint32

func (*AnnounceRequest) ProtoMessage

func (*AnnounceRequest) ProtoMessage()

func (*AnnounceRequest) ProtoReflect

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

func (*AnnounceRequest) Reset

func (x *AnnounceRequest) Reset()

func (*AnnounceRequest) String

func (x *AnnounceRequest) String() string

type ControlClient

type ControlClient interface {
	Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingReply, error)
	// Announce tells the peer this endpoint moved (after a QUIC migration). The surviving
	// control channel carries the new coordinates so the peer re-dials directly, skipping the
	// heartbeat timeout + relay lookup.
	Announce(ctx context.Context, in *AnnounceRequest, opts ...grpc.CallOption) (*AnnounceReply, error)
}

ControlClient is the client API for Control 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.

Control is the transport's own service, independent of any app. Ping is the Manager's heartbeat (RTT + dead-link detection); kept separate so the manager works with any gRPC service.

func NewControlClient

func NewControlClient(cc grpc.ClientConnInterface) ControlClient

type ControlServer

type ControlServer interface {
	Ping(context.Context, *PingRequest) (*PingReply, error)
	// Announce tells the peer this endpoint moved (after a QUIC migration). The surviving
	// control channel carries the new coordinates so the peer re-dials directly, skipping the
	// heartbeat timeout + relay lookup.
	Announce(context.Context, *AnnounceRequest) (*AnnounceReply, error)
	// contains filtered or unexported methods
}

ControlServer is the server API for Control service. All implementations must embed UnimplementedControlServer for forward compatibility.

Control is the transport's own service, independent of any app. Ping is the Manager's heartbeat (RTT + dead-link detection); kept separate so the manager works with any gRPC service.

type PingReply

type PingReply struct {
	// contains filtered or unexported fields
}

func (*PingReply) Descriptor deprecated

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

Deprecated: Use PingReply.ProtoReflect.Descriptor instead.

func (*PingReply) ProtoMessage

func (*PingReply) ProtoMessage()

func (*PingReply) ProtoReflect

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

func (*PingReply) Reset

func (x *PingReply) Reset()

func (*PingReply) String

func (x *PingReply) String() string

type PingRequest

type PingRequest struct {
	// contains filtered or unexported fields
}

func (*PingRequest) Descriptor deprecated

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

Deprecated: Use PingRequest.ProtoReflect.Descriptor instead.

func (*PingRequest) ProtoMessage

func (*PingRequest) ProtoMessage()

func (*PingRequest) ProtoReflect

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

func (*PingRequest) Reset

func (x *PingRequest) Reset()

func (*PingRequest) String

func (x *PingRequest) String() string

type UnimplementedControlServer

type UnimplementedControlServer struct{}

UnimplementedControlServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedControlServer) Announce

func (UnimplementedControlServer) Ping

type UnsafeControlServer

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

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

Jump to

Keyboard shortcuts

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