messenger

package
v1.22.61 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2025 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Messenger_Notify_FullMethodName = "/messenger.Messenger/Notify"
)

Variables

View Source
var (
	MessageType_name = map[int32]string{
		0:  "MESSAGE_TYPE_UNSPECIFIED",
		1:  "MESSAGE_TYPE_PENDING_TXS",
		2:  "MESSAGE_TYPE_PUT_BLOCK",
		3:  "MESSAGE_TYPE_GET_BLOCK",
		4:  "MESSAGE_TYPE_GET_ACCEPTED",
		5:  "MESSAGE_TYPE_ACCEPTED",
		6:  "MESSAGE_TYPE_GET_ANCESTORS",
		7:  "MESSAGE_TYPE_MULTI_PUT",
		8:  "MESSAGE_TYPE_GET_FAILED",
		9:  "MESSAGE_TYPE_QUERY_FAILED",
		10: "MESSAGE_TYPE_CHITS",
	}
	MessageType_value = map[string]int32{
		"MESSAGE_TYPE_UNSPECIFIED":   0,
		"MESSAGE_TYPE_PENDING_TXS":   1,
		"MESSAGE_TYPE_PUT_BLOCK":     2,
		"MESSAGE_TYPE_GET_BLOCK":     3,
		"MESSAGE_TYPE_GET_ACCEPTED":  4,
		"MESSAGE_TYPE_ACCEPTED":      5,
		"MESSAGE_TYPE_GET_ANCESTORS": 6,
		"MESSAGE_TYPE_MULTI_PUT":     7,
		"MESSAGE_TYPE_GET_FAILED":    8,
		"MESSAGE_TYPE_QUERY_FAILED":  9,
		"MESSAGE_TYPE_CHITS":         10,
	}
)

Enum value maps for MessageType.

View Source
var File_proto_messenger_messenger_proto protoreflect.FileDescriptor
View Source
var Messenger_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "messenger.Messenger",
	HandlerType: (*MessengerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Notify",
			Handler:    _Messenger_Notify_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/messenger/messenger.proto",
}

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

Functions

func RegisterMessengerServer

func RegisterMessengerServer(s grpc.ServiceRegistrar, srv MessengerServer)

Types

type Message

type Message struct {
	Type    MessageType `protobuf:"varint,1,opt,name=type,proto3,enum=messenger.MessageType" json:"type,omitempty"`
	NodeId  []byte      `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
	Content []byte      `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

func (*Message) Descriptor deprecated

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

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetContent

func (x *Message) GetContent() []byte

func (*Message) GetNodeId

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

func (*Message) GetType

func (x *Message) GetType() MessageType

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

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

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

type MessageType

type MessageType int32
const (
	MessageType_MESSAGE_TYPE_UNSPECIFIED   MessageType = 0
	MessageType_MESSAGE_TYPE_PENDING_TXS   MessageType = 1
	MessageType_MESSAGE_TYPE_PUT_BLOCK     MessageType = 2
	MessageType_MESSAGE_TYPE_GET_BLOCK     MessageType = 3
	MessageType_MESSAGE_TYPE_GET_ACCEPTED  MessageType = 4
	MessageType_MESSAGE_TYPE_ACCEPTED      MessageType = 5
	MessageType_MESSAGE_TYPE_GET_ANCESTORS MessageType = 6
	MessageType_MESSAGE_TYPE_MULTI_PUT     MessageType = 7
	MessageType_MESSAGE_TYPE_GET_FAILED    MessageType = 8
	MessageType_MESSAGE_TYPE_QUERY_FAILED  MessageType = 9
	MessageType_MESSAGE_TYPE_CHITS         MessageType = 10
)

func (MessageType) Descriptor

func (MessageType) Enum

func (x MessageType) Enum() *MessageType

func (MessageType) EnumDescriptor deprecated

func (MessageType) EnumDescriptor() ([]byte, []int)

Deprecated: Use MessageType.Descriptor instead.

func (MessageType) Number

func (x MessageType) Number() protoreflect.EnumNumber

func (MessageType) String

func (x MessageType) String() string

func (MessageType) Type

type MessengerClient

type MessengerClient interface {
	Notify(ctx context.Context, in *NotifyRequest, opts ...grpc.CallOption) (*NotifyResponse, error)
}

MessengerClient is the client API for Messenger 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 NewMessengerClient

func NewMessengerClient(cc grpc.ClientConnInterface) MessengerClient

type MessengerServer

type MessengerServer interface {
	Notify(context.Context, *NotifyRequest) (*NotifyResponse, error)
	// contains filtered or unexported methods
}

MessengerServer is the server API for Messenger service. All implementations must embed UnimplementedMessengerServer for forward compatibility.

type NotifyRequest

type NotifyRequest struct {
	Message *Message `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*NotifyRequest) Descriptor deprecated

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

Deprecated: Use NotifyRequest.ProtoReflect.Descriptor instead.

func (*NotifyRequest) GetMessage

func (x *NotifyRequest) GetMessage() *Message

func (*NotifyRequest) ProtoMessage

func (*NotifyRequest) ProtoMessage()

func (*NotifyRequest) ProtoReflect

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

func (*NotifyRequest) Reset

func (x *NotifyRequest) Reset()

func (*NotifyRequest) String

func (x *NotifyRequest) String() string

type NotifyResponse

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

func (*NotifyResponse) Descriptor deprecated

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

Deprecated: Use NotifyResponse.ProtoReflect.Descriptor instead.

func (*NotifyResponse) ProtoMessage

func (*NotifyResponse) ProtoMessage()

func (*NotifyResponse) ProtoReflect

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

func (*NotifyResponse) Reset

func (x *NotifyResponse) Reset()

func (*NotifyResponse) String

func (x *NotifyResponse) String() string

type UnimplementedMessengerServer

type UnimplementedMessengerServer struct{}

UnimplementedMessengerServer 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 (UnimplementedMessengerServer) Notify

type UnsafeMessengerServer

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

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

Jump to

Keyboard shortcuts

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