appsender

package
v1.12.0-initial-poc.3 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: BSD-3-Clause Imports: 9 Imported by: 6

Documentation

Index

Constants

View Source
const (
	AppSender_SendAppRequest_FullMethodName  = "/appsender.AppSender/SendAppRequest"
	AppSender_SendAppResponse_FullMethodName = "/appsender.AppSender/SendAppResponse"
	AppSender_SendAppError_FullMethodName    = "/appsender.AppSender/SendAppError"
	AppSender_SendAppGossip_FullMethodName   = "/appsender.AppSender/SendAppGossip"
)

Variables

View Source
var AppSender_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "appsender.AppSender",
	HandlerType: (*AppSenderServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SendAppRequest",
			Handler:    _AppSender_SendAppRequest_Handler,
		},
		{
			MethodName: "SendAppResponse",
			Handler:    _AppSender_SendAppResponse_Handler,
		},
		{
			MethodName: "SendAppError",
			Handler:    _AppSender_SendAppError_Handler,
		},
		{
			MethodName: "SendAppGossip",
			Handler:    _AppSender_SendAppGossip_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "appsender/appsender.proto",
}

AppSender_ServiceDesc is the grpc.ServiceDesc for AppSender 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_appsender_appsender_proto protoreflect.FileDescriptor

Functions

func RegisterAppSenderServer

func RegisterAppSenderServer(s grpc.ServiceRegistrar, srv AppSenderServer)

Types

type AppSenderClient

type AppSenderClient interface {
	SendAppRequest(ctx context.Context, in *SendAppRequestMsg, opts ...grpc.CallOption) (*emptypb.Empty, error)
	SendAppResponse(ctx context.Context, in *SendAppResponseMsg, opts ...grpc.CallOption) (*emptypb.Empty, error)
	SendAppError(ctx context.Context, in *SendAppErrorMsg, opts ...grpc.CallOption) (*emptypb.Empty, error)
	SendAppGossip(ctx context.Context, in *SendAppGossipMsg, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

AppSenderClient is the client API for AppSender 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 NewAppSenderClient

func NewAppSenderClient(cc grpc.ClientConnInterface) AppSenderClient

type AppSenderServer

type AppSenderServer interface {
	SendAppRequest(context.Context, *SendAppRequestMsg) (*emptypb.Empty, error)
	SendAppResponse(context.Context, *SendAppResponseMsg) (*emptypb.Empty, error)
	SendAppError(context.Context, *SendAppErrorMsg) (*emptypb.Empty, error)
	SendAppGossip(context.Context, *SendAppGossipMsg) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

AppSenderServer is the server API for AppSender service. All implementations must embed UnimplementedAppSenderServer for forward compatibility

type SendAppErrorMsg added in v1.11.0

type SendAppErrorMsg struct {

	// The node to send a response to
	NodeId []byte `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
	// ID of this request
	RequestId uint32 `protobuf:"varint,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	// Application-defined error code
	ErrorCode int32 `protobuf:"zigzag32,3,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"`
	// Application-defined error message
	ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
	// contains filtered or unexported fields
}

func (*SendAppErrorMsg) Descriptor deprecated added in v1.11.0

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

Deprecated: Use SendAppErrorMsg.ProtoReflect.Descriptor instead.

func (*SendAppErrorMsg) GetErrorCode added in v1.11.0

func (x *SendAppErrorMsg) GetErrorCode() int32

func (*SendAppErrorMsg) GetErrorMessage added in v1.11.0

func (x *SendAppErrorMsg) GetErrorMessage() string

func (*SendAppErrorMsg) GetNodeId added in v1.11.0

func (x *SendAppErrorMsg) GetNodeId() []byte

func (*SendAppErrorMsg) GetRequestId added in v1.11.0

func (x *SendAppErrorMsg) GetRequestId() uint32

func (*SendAppErrorMsg) ProtoMessage added in v1.11.0

func (*SendAppErrorMsg) ProtoMessage()

func (*SendAppErrorMsg) ProtoReflect added in v1.11.0

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

func (*SendAppErrorMsg) Reset added in v1.11.0

func (x *SendAppErrorMsg) Reset()

func (*SendAppErrorMsg) String added in v1.11.0

func (x *SendAppErrorMsg) String() string

type SendAppGossipMsg

type SendAppGossipMsg struct {

	// Who to send this message to
	NodeIds       [][]byte `protobuf:"bytes,1,rep,name=node_ids,json=nodeIds,proto3" json:"node_ids,omitempty"`
	Validators    uint64   `protobuf:"varint,2,opt,name=validators,proto3" json:"validators,omitempty"`
	NonValidators uint64   `protobuf:"varint,3,opt,name=non_validators,json=nonValidators,proto3" json:"non_validators,omitempty"`
	Peers         uint64   `protobuf:"varint,4,opt,name=peers,proto3" json:"peers,omitempty"`
	// The message body
	Msg []byte `protobuf:"bytes,5,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*SendAppGossipMsg) Descriptor deprecated

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

Deprecated: Use SendAppGossipMsg.ProtoReflect.Descriptor instead.

func (*SendAppGossipMsg) GetMsg

func (x *SendAppGossipMsg) GetMsg() []byte

func (*SendAppGossipMsg) GetNodeIds added in v1.11.3

func (x *SendAppGossipMsg) GetNodeIds() [][]byte

func (*SendAppGossipMsg) GetNonValidators added in v1.11.3

func (x *SendAppGossipMsg) GetNonValidators() uint64

func (*SendAppGossipMsg) GetPeers added in v1.11.3

func (x *SendAppGossipMsg) GetPeers() uint64

func (*SendAppGossipMsg) GetValidators added in v1.11.3

func (x *SendAppGossipMsg) GetValidators() uint64

func (*SendAppGossipMsg) ProtoMessage

func (*SendAppGossipMsg) ProtoMessage()

func (*SendAppGossipMsg) ProtoReflect

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

func (*SendAppGossipMsg) Reset

func (x *SendAppGossipMsg) Reset()

func (*SendAppGossipMsg) String

func (x *SendAppGossipMsg) String() string

type SendAppRequestMsg

type SendAppRequestMsg struct {

	// The nodes to send this request to
	NodeIds [][]byte `protobuf:"bytes,1,rep,name=node_ids,json=nodeIds,proto3" json:"node_ids,omitempty"`
	// The ID of this request
	RequestId uint32 `protobuf:"varint,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	// The request body
	Request []byte `protobuf:"bytes,3,opt,name=request,proto3" json:"request,omitempty"`
	// contains filtered or unexported fields
}

func (*SendAppRequestMsg) Descriptor deprecated

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

Deprecated: Use SendAppRequestMsg.ProtoReflect.Descriptor instead.

func (*SendAppRequestMsg) GetNodeIds

func (x *SendAppRequestMsg) GetNodeIds() [][]byte

func (*SendAppRequestMsg) GetRequest

func (x *SendAppRequestMsg) GetRequest() []byte

func (*SendAppRequestMsg) GetRequestId

func (x *SendAppRequestMsg) GetRequestId() uint32

func (*SendAppRequestMsg) ProtoMessage

func (*SendAppRequestMsg) ProtoMessage()

func (*SendAppRequestMsg) ProtoReflect

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

func (*SendAppRequestMsg) Reset

func (x *SendAppRequestMsg) Reset()

func (*SendAppRequestMsg) String

func (x *SendAppRequestMsg) String() string

type SendAppResponseMsg

type SendAppResponseMsg struct {

	// The node to send a response to
	NodeId []byte `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
	// ID of this request
	RequestId uint32 `protobuf:"varint,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	// The response body
	Response []byte `protobuf:"bytes,3,opt,name=response,proto3" json:"response,omitempty"`
	// contains filtered or unexported fields
}

func (*SendAppResponseMsg) Descriptor deprecated

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

Deprecated: Use SendAppResponseMsg.ProtoReflect.Descriptor instead.

func (*SendAppResponseMsg) GetNodeId

func (x *SendAppResponseMsg) GetNodeId() []byte

func (*SendAppResponseMsg) GetRequestId

func (x *SendAppResponseMsg) GetRequestId() uint32

func (*SendAppResponseMsg) GetResponse

func (x *SendAppResponseMsg) GetResponse() []byte

func (*SendAppResponseMsg) ProtoMessage

func (*SendAppResponseMsg) ProtoMessage()

func (*SendAppResponseMsg) ProtoReflect

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

func (*SendAppResponseMsg) Reset

func (x *SendAppResponseMsg) Reset()

func (*SendAppResponseMsg) String

func (x *SendAppResponseMsg) String() string

type UnimplementedAppSenderServer

type UnimplementedAppSenderServer struct {
}

UnimplementedAppSenderServer must be embedded to have forward compatible implementations.

func (UnimplementedAppSenderServer) SendAppError added in v1.11.0

func (UnimplementedAppSenderServer) SendAppGossip

func (UnimplementedAppSenderServer) SendAppRequest

func (UnimplementedAppSenderServer) SendAppResponse

type UnsafeAppSenderServer

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

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

Jump to

Keyboard shortcuts

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