relayer

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Relayer_GetTpuConfigs_FullMethodName    = "/relayer.Relayer/GetTpuConfigs"
	Relayer_SubscribePackets_FullMethodName = "/relayer.Relayer/SubscribePackets"
)

Variables

View Source
var File_relayer_proto protoreflect.FileDescriptor
View Source
var Relayer_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "relayer.Relayer",
	HandlerType: (*RelayerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetTpuConfigs",
			Handler:    _Relayer_GetTpuConfigs_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "SubscribePackets",
			Handler:       _Relayer_SubscribePackets_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "relayer.proto",
}

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

Functions

func RegisterRelayerServer

func RegisterRelayerServer(s grpc.ServiceRegistrar, srv RelayerServer)

Types

type GetTpuConfigsRequest

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

func (*GetTpuConfigsRequest) Descriptor deprecated

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

Deprecated: Use GetTpuConfigsRequest.ProtoReflect.Descriptor instead.

func (*GetTpuConfigsRequest) ProtoMessage

func (*GetTpuConfigsRequest) ProtoMessage()

func (*GetTpuConfigsRequest) ProtoReflect

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

func (*GetTpuConfigsRequest) Reset

func (x *GetTpuConfigsRequest) Reset()

func (*GetTpuConfigsRequest) String

func (x *GetTpuConfigsRequest) String() string

type GetTpuConfigsResponse

type GetTpuConfigsResponse struct {
	Tpu        *shared.Socket `protobuf:"bytes,1,opt,name=tpu,proto3" json:"tpu,omitempty"`
	TpuForward *shared.Socket `protobuf:"bytes,2,opt,name=tpu_forward,json=tpuForward,proto3" json:"tpu_forward,omitempty"`
	// contains filtered or unexported fields
}

func (*GetTpuConfigsResponse) Descriptor deprecated

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

Deprecated: Use GetTpuConfigsResponse.ProtoReflect.Descriptor instead.

func (*GetTpuConfigsResponse) GetTpu

func (x *GetTpuConfigsResponse) GetTpu() *shared.Socket

func (*GetTpuConfigsResponse) GetTpuForward

func (x *GetTpuConfigsResponse) GetTpuForward() *shared.Socket

func (*GetTpuConfigsResponse) ProtoMessage

func (*GetTpuConfigsResponse) ProtoMessage()

func (*GetTpuConfigsResponse) ProtoReflect

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

func (*GetTpuConfigsResponse) Reset

func (x *GetTpuConfigsResponse) Reset()

func (*GetTpuConfigsResponse) String

func (x *GetTpuConfigsResponse) String() string

type RelayerClient

type RelayerClient interface {
	// The relayer has TPU and TPU forward sockets that validators can leverage.
	// A validator can fetch this config and change its TPU and TPU forward port in gossip.
	GetTpuConfigs(ctx context.Context, in *GetTpuConfigsRequest, opts ...grpc.CallOption) (*GetTpuConfigsResponse, error)
	// Validators can subscribe to packets from the relayer and receive a multiplexed signal that contains a mixture
	// of packets and heartbeats
	SubscribePackets(ctx context.Context, in *SubscribePacketsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[SubscribePacketsResponse], error)
}

RelayerClient is the client API for Relayer 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.

/ Relayers offer a TPU and TPU forward proxy for Solana validators. / Validators can connect and fetch the TPU configuration for the relayer and start to advertise the / relayer's information in gossip. / They can also subscribe to packets which arrived on the TPU ports at the relayer

func NewRelayerClient

func NewRelayerClient(cc grpc.ClientConnInterface) RelayerClient

type RelayerServer

type RelayerServer interface {
	// The relayer has TPU and TPU forward sockets that validators can leverage.
	// A validator can fetch this config and change its TPU and TPU forward port in gossip.
	GetTpuConfigs(context.Context, *GetTpuConfigsRequest) (*GetTpuConfigsResponse, error)
	// Validators can subscribe to packets from the relayer and receive a multiplexed signal that contains a mixture
	// of packets and heartbeats
	SubscribePackets(*SubscribePacketsRequest, grpc.ServerStreamingServer[SubscribePacketsResponse]) error
	// contains filtered or unexported methods
}

RelayerServer is the server API for Relayer service. All implementations must embed UnimplementedRelayerServer for forward compatibility.

/ Relayers offer a TPU and TPU forward proxy for Solana validators. / Validators can connect and fetch the TPU configuration for the relayer and start to advertise the / relayer's information in gossip. / They can also subscribe to packets which arrived on the TPU ports at the relayer

type Relayer_SubscribePacketsClient

type Relayer_SubscribePacketsClient = grpc.ServerStreamingClient[SubscribePacketsResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Relayer_SubscribePacketsServer

type Relayer_SubscribePacketsServer = grpc.ServerStreamingServer[SubscribePacketsResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type SubscribePacketsRequest

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

func (*SubscribePacketsRequest) Descriptor deprecated

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

Deprecated: Use SubscribePacketsRequest.ProtoReflect.Descriptor instead.

func (*SubscribePacketsRequest) ProtoMessage

func (*SubscribePacketsRequest) ProtoMessage()

func (*SubscribePacketsRequest) ProtoReflect

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

func (*SubscribePacketsRequest) Reset

func (x *SubscribePacketsRequest) Reset()

func (*SubscribePacketsRequest) String

func (x *SubscribePacketsRequest) String() string

type SubscribePacketsResponse

type SubscribePacketsResponse struct {
	Header *shared.Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	// Types that are assignable to Msg:
	//
	//	*SubscribePacketsResponse_Heartbeat
	//	*SubscribePacketsResponse_Batch
	Msg isSubscribePacketsResponse_Msg `protobuf_oneof:"msg"`
	// contains filtered or unexported fields
}

func (*SubscribePacketsResponse) Descriptor deprecated

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

Deprecated: Use SubscribePacketsResponse.ProtoReflect.Descriptor instead.

func (*SubscribePacketsResponse) GetBatch

func (*SubscribePacketsResponse) GetHeader

func (x *SubscribePacketsResponse) GetHeader() *shared.Header

func (*SubscribePacketsResponse) GetHeartbeat

func (x *SubscribePacketsResponse) GetHeartbeat() *shared.Heartbeat

func (*SubscribePacketsResponse) GetMsg

func (m *SubscribePacketsResponse) GetMsg() isSubscribePacketsResponse_Msg

func (*SubscribePacketsResponse) ProtoMessage

func (*SubscribePacketsResponse) ProtoMessage()

func (*SubscribePacketsResponse) ProtoReflect

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

func (*SubscribePacketsResponse) Reset

func (x *SubscribePacketsResponse) Reset()

func (*SubscribePacketsResponse) String

func (x *SubscribePacketsResponse) String() string

type SubscribePacketsResponse_Batch

type SubscribePacketsResponse_Batch struct {
	Batch *packet.PacketBatch `protobuf:"bytes,3,opt,name=batch,proto3,oneof"`
}

type SubscribePacketsResponse_Heartbeat

type SubscribePacketsResponse_Heartbeat struct {
	Heartbeat *shared.Heartbeat `protobuf:"bytes,2,opt,name=heartbeat,proto3,oneof"`
}

type UnimplementedRelayerServer

type UnimplementedRelayerServer struct{}

UnimplementedRelayerServer 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 (UnimplementedRelayerServer) GetTpuConfigs

type UnsafeRelayerServer

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

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

Jump to

Keyboard shortcuts

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