pb

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: MulanPSL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func RegisterNatsServer

func RegisterNatsServer(s *grpc.Server, srv NatsServer)

Types

type Message

type Message struct {
	Channel   string `protobuf:"bytes,1,opt,name=channel,proto3" json:"channel,omitempty"` //channel id
	Subtopic  string `protobuf:"bytes,2,opt,name=subtopic,proto3" json:"subtopic,omitempty"`
	Publisher string `protobuf:"bytes,3,opt,name=publisher,proto3" json:"publisher,omitempty"` //thing id
	Protocol  string `protobuf:"bytes,4,opt,name=protocol,proto3" json:"protocol,omitempty"`
	Payload   []byte `protobuf:"bytes,5,opt,name=payload,proto3" json:"payload,omitempty"`
	Created   int64  `protobuf:"varint,6,opt,name=created,proto3" json:"created,omitempty"` //timestamp gtime.Now().Timestamp()
	// contains filtered or unexported fields
}

Message corex适配器层发出的消息

func (*Message) Descriptor deprecated

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

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetChannel

func (x *Message) GetChannel() string

func (*Message) GetCreated

func (x *Message) GetCreated() int64

func (*Message) GetPayload

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

func (*Message) GetProtocol

func (x *Message) GetProtocol() string

func (*Message) GetPublisher

func (x *Message) GetPublisher() string

func (*Message) GetSubtopic

func (x *Message) GetSubtopic() string

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 NatsClient

type NatsClient interface {
	AdapterMessages(ctx context.Context, in *Message, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

NatsClient is the client API for Nats service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewNatsClient

func NewNatsClient(cc grpc.ClientConnInterface) NatsClient

type NatsServer

type NatsServer interface {
	AdapterMessages(context.Context, *Message) (*emptypb.Empty, error)
}

NatsServer is the server API for Nats service.

type UnimplementedNatsServer

type UnimplementedNatsServer struct {
}

UnimplementedNatsServer can be embedded to have forward compatible implementations.

func (*UnimplementedNatsServer) AdapterMessages

Jump to

Keyboard shortcuts

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