broker

package
v3.0.0-rc1+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2021 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package broker is a generated protocol buffer package.

It is generated from these files:

message.proto

It has these top-level messages:

Empty
PublishRequest
SubscribeRequest
Message

Package broker is a generated protocol buffer package.

It is generated from these files:

message.proto

It has these top-level messages:

Empty
PublishRequest
SubscribeRequest
Message

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterBrokerHandler

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

Types

type Broker

type Broker struct {
	BrokerHandler
}

func (*Broker) Publish

func (h *Broker) Publish(ctx context.Context, stream server.Streamer) error

func (*Broker) Subscribe

func (h *Broker) Subscribe(ctx context.Context, stream server.Streamer) error

type BrokerClient

type BrokerClient interface {
	Publish(ctx context.Context, opts ...client.CallOption) (Broker_PublishClient, error)
	Subscribe(ctx context.Context, in *SubscribeRequest, opts ...client.CallOption) (Broker_SubscribeClient, error)
}

func NewBrokerClient

func NewBrokerClient(serviceName string, c client.Client) BrokerClient

type BrokerHandler

type BrokerHandler interface {
	Publish(context.Context, Broker_PublishStream) error
	Subscribe(context.Context, *SubscribeRequest, Broker_SubscribeStream) error
}

type Broker_PublishClient

type Broker_PublishClient interface {
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	Close() error
	Send(*PublishRequest) error
}

type Broker_PublishStream

type Broker_PublishStream interface {
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	Close() error
	Recv() (*PublishRequest, error)
}

type Broker_SubscribeClient

type Broker_SubscribeClient interface {
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	Close() error
	Recv() (*Message, error)
}

type Broker_SubscribeStream

type Broker_SubscribeStream interface {
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	Close() error
	Send(*Message) error
}

type Empty

type Empty struct {
}

func (*Empty) Descriptor

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

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) Reset

func (m *Empty) Reset()

func (*Empty) String

func (m *Empty) String() string

func (*Empty) Validate

func (this *Empty) Validate() error

type Message

type Message struct {
	Header map[string]string `` /* 132-byte string literal not displayed */
	Body   []byte            `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"`
}

func (*Message) Descriptor

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

func (*Message) GetBody

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

func (*Message) GetHeader

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

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) Reset

func (m *Message) Reset()

func (*Message) String

func (m *Message) String() string

func (*Message) Validate

func (this *Message) Validate() error

type PublishRequest

type PublishRequest struct {
	Topic   string   `protobuf:"bytes,1,opt,name=topic" json:"topic,omitempty"`
	Message *Message `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"`
}

func (*PublishRequest) Descriptor

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

func (*PublishRequest) GetMessage

func (m *PublishRequest) GetMessage() *Message

func (*PublishRequest) GetTopic

func (m *PublishRequest) GetTopic() string

func (*PublishRequest) ProtoMessage

func (*PublishRequest) ProtoMessage()

func (*PublishRequest) Reset

func (m *PublishRequest) Reset()

func (*PublishRequest) String

func (m *PublishRequest) String() string

func (*PublishRequest) Validate

func (this *PublishRequest) Validate() error

type SubscribeRequest

type SubscribeRequest struct {
	Topic string `protobuf:"bytes,1,opt,name=topic" json:"topic,omitempty"`
	Queue string `protobuf:"bytes,2,opt,name=queue" json:"queue,omitempty"`
}

func (*SubscribeRequest) Descriptor

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

func (*SubscribeRequest) GetQueue

func (m *SubscribeRequest) GetQueue() string

func (*SubscribeRequest) GetTopic

func (m *SubscribeRequest) GetTopic() string

func (*SubscribeRequest) ProtoMessage

func (*SubscribeRequest) ProtoMessage()

func (*SubscribeRequest) Reset

func (m *SubscribeRequest) Reset()

func (*SubscribeRequest) String

func (m *SubscribeRequest) String() string

func (*SubscribeRequest) Validate

func (this *SubscribeRequest) Validate() error

Jump to

Keyboard shortcuts

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