proto

package
v0.0.0-...-fa6fafb Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Broker_Publish_FullMethodName = "/Broker/Publish"
)

Variables

View Source
var Broker_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "Broker",
	HandlerType: (*BrokerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Publish",
			Handler:    _Broker_Publish_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/broker.proto",
}

Broker_ServiceDesc is the grpc.ServiceDesc for Broker 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_proto_broker_proto protoreflect.FileDescriptor

Functions

func RegisterBrokerHandler

func RegisterBrokerHandler(s server.Server, hdlr BrokerHandler, opts ...server.HandlerOption) error

func RegisterBrokerServer

func RegisterBrokerServer(s grpc.ServiceRegistrar, srv BrokerServer)

Types

type BrokerClient

type BrokerClient interface {
	Publish(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Empty, error)
}

BrokerClient is the client API for Broker 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 NewBrokerClient

func NewBrokerClient(cc grpc.ClientConnInterface) BrokerClient

type BrokerHandler

type BrokerHandler interface {
	Publish(context.Context, *Message, *Empty) error
}

type BrokerServer

type BrokerServer interface {
	Publish(context.Context, *Message) (*Empty, error)
	// contains filtered or unexported methods
}

BrokerServer is the server API for Broker service. All implementations must embed UnimplementedBrokerServer for forward compatibility.

type BrokerService

type BrokerService interface {
	Publish(ctx context.Context, in *Message, opts ...client.CallOption) (*Empty, error)
}

func NewBrokerService

func NewBrokerService(name string, c client.Client) BrokerService

type Empty

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

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type Message

type Message struct {
	Topic  string            `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
	Id     string            `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	Header map[string]string `` /* 153-byte string literal not displayed */
	Body   []byte            `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"`
	// contains filtered or unexported fields
}

func (*Message) Descriptor deprecated

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

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetBody

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

func (*Message) GetHeader

func (x *Message) GetHeader() map[string]string

func (*Message) GetId

func (x *Message) GetId() string

func (*Message) GetTopic

func (x *Message) GetTopic() 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 UnimplementedBrokerServer

type UnimplementedBrokerServer struct{}

UnimplementedBrokerServer 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 (UnimplementedBrokerServer) Publish

type UnsafeBrokerServer

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

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

Jump to

Keyboard shortcuts

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