Documentation ¶
Index ¶
Constants ¶
const (
Shredstream_SendHeartbeat_FullMethodName = "/shredstream.Shredstream/SendHeartbeat"
)
Variables ¶
var File_shredstream_proto protoreflect.FileDescriptor
var Shredstream_ServiceDesc = grpc.ServiceDesc{ ServiceName: "shredstream.Shredstream", HandlerType: (*ShredstreamServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SendHeartbeat", Handler: _Shredstream_SendHeartbeat_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "shredstream.proto", }
Shredstream_ServiceDesc is the grpc.ServiceDesc for Shredstream service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterShredstreamServer ¶
func RegisterShredstreamServer(s grpc.ServiceRegistrar, srv ShredstreamServer)
Types ¶
type Heartbeat ¶
type Heartbeat struct { // don't trust IP:PORT from tcp header since it can be tampered over the wire // `socket.ip` must match incoming packet's ip. this prevents spamming an unwitting destination Socket *shared.Socket `protobuf:"bytes,1,opt,name=socket,proto3" json:"socket,omitempty"` // regions for shredstream proxy to receive shreds from // list of valid regions: https://jito-labs.gitbook.io/mev/systems/connecting/mainnet Regions []string `protobuf:"bytes,2,rep,name=regions,proto3" json:"regions,omitempty"` // contains filtered or unexported fields }
func (*Heartbeat) Descriptor
deprecated
func (*Heartbeat) GetRegions ¶
func (*Heartbeat) ProtoMessage ¶
func (*Heartbeat) ProtoMessage()
func (*Heartbeat) ProtoReflect ¶
func (x *Heartbeat) ProtoReflect() protoreflect.Message
type HeartbeatResponse ¶
type HeartbeatResponse struct { // client must respond within `ttl_ms` to keep stream alive TtlMs uint32 `protobuf:"varint,1,opt,name=ttl_ms,json=ttlMs,proto3" json:"ttl_ms,omitempty"` // contains filtered or unexported fields }
func (*HeartbeatResponse) Descriptor
deprecated
func (*HeartbeatResponse) Descriptor() ([]byte, []int)
Deprecated: Use HeartbeatResponse.ProtoReflect.Descriptor instead.
func (*HeartbeatResponse) GetTtlMs ¶
func (x *HeartbeatResponse) GetTtlMs() uint32
func (*HeartbeatResponse) ProtoMessage ¶
func (*HeartbeatResponse) ProtoMessage()
func (*HeartbeatResponse) ProtoReflect ¶
func (x *HeartbeatResponse) ProtoReflect() protoreflect.Message
func (*HeartbeatResponse) Reset ¶
func (x *HeartbeatResponse) Reset()
func (*HeartbeatResponse) String ¶
func (x *HeartbeatResponse) String() string
type ShredstreamClient ¶
type ShredstreamClient interface { // RPC endpoint to send heartbeats to keep shreds flowing SendHeartbeat(ctx context.Context, in *Heartbeat, opts ...grpc.CallOption) (*HeartbeatResponse, error) }
ShredstreamClient is the client API for Shredstream 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 NewShredstreamClient ¶
func NewShredstreamClient(cc grpc.ClientConnInterface) ShredstreamClient
type ShredstreamServer ¶
type ShredstreamServer interface { // RPC endpoint to send heartbeats to keep shreds flowing SendHeartbeat(context.Context, *Heartbeat) (*HeartbeatResponse, error) // contains filtered or unexported methods }
ShredstreamServer is the server API for Shredstream service. All implementations must embed UnimplementedShredstreamServer for forward compatibility.
type UnimplementedShredstreamServer ¶
type UnimplementedShredstreamServer struct{}
UnimplementedShredstreamServer 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 (UnimplementedShredstreamServer) SendHeartbeat ¶
func (UnimplementedShredstreamServer) SendHeartbeat(context.Context, *Heartbeat) (*HeartbeatResponse, error)
type UnsafeShredstreamServer ¶
type UnsafeShredstreamServer interface {
// contains filtered or unexported methods
}
UnsafeShredstreamServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ShredstreamServer will result in compilation errors.