rpc

package
v0.0.51-rc11 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2019 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package rpc is a generated protocol buffer package.

It is generated from these files:

rpc.proto

It has these top-level messages:

SessionFilter
CloseSessionInput
CloseSessionOutput
ListSessionsOutput
MessagePublished
MessagePublishedOutput

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPoolNotFound = errors.New("pool not found")
)

Functions

func New

func New(port int, handler broker) net.Listener

func RegisterBrokerServiceServer

func RegisterBrokerServiceServer(s *grpc.Server, srv BrokerServiceServer)

Types

type BrokerServiceClient

type BrokerServiceClient interface {
	ListSessions(ctx context.Context, in *SessionFilter, opts ...grpc.CallOption) (*ListSessionsOutput, error)
	CloseSession(ctx context.Context, in *CloseSessionInput, opts ...grpc.CallOption) (*CloseSessionOutput, error)
	DistributeMessage(ctx context.Context, in *MessagePublished, opts ...grpc.CallOption) (*MessagePublishedOutput, error)
}

func NewBrokerServiceClient

func NewBrokerServiceClient(cc *grpc.ClientConn) BrokerServiceClient

type BrokerServiceServer

type BrokerServiceServer interface {
	ListSessions(context.Context, *SessionFilter) (*ListSessionsOutput, error)
	CloseSession(context.Context, *CloseSessionInput) (*CloseSessionOutput, error)
	DistributeMessage(context.Context, *MessagePublished) (*MessagePublishedOutput, error)
}

type Caller added in v0.0.37

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

func NewCaller added in v0.0.37

func NewCaller() *Caller

func (*Caller) Call added in v0.0.37

func (c *Caller) Call(addr string, job RPCJob) error

func (*Caller) Cancel added in v0.0.37

func (c *Caller) Cancel(addr string) error

type CloseSessionInput added in v0.0.32

type CloseSessionInput struct {
	ID string `protobuf:"bytes,1,opt,name=ID" json:"ID,omitempty"`
}

func (*CloseSessionInput) Descriptor added in v0.0.32

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

func (*CloseSessionInput) GetID added in v0.0.32

func (m *CloseSessionInput) GetID() string

func (*CloseSessionInput) ProtoMessage added in v0.0.32

func (*CloseSessionInput) ProtoMessage()

func (*CloseSessionInput) Reset added in v0.0.32

func (m *CloseSessionInput) Reset()

func (*CloseSessionInput) String added in v0.0.32

func (m *CloseSessionInput) String() string

type CloseSessionOutput added in v0.0.32

type CloseSessionOutput struct {
	ID string `protobuf:"bytes,1,opt,name=ID" json:"ID,omitempty"`
}

func (*CloseSessionOutput) Descriptor added in v0.0.32

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

func (*CloseSessionOutput) GetID added in v0.0.32

func (m *CloseSessionOutput) GetID() string

func (*CloseSessionOutput) ProtoMessage added in v0.0.32

func (*CloseSessionOutput) ProtoMessage()

func (*CloseSessionOutput) Reset added in v0.0.32

func (m *CloseSessionOutput) Reset()

func (*CloseSessionOutput) String added in v0.0.32

func (m *CloseSessionOutput) String() string

type JobWrap added in v0.0.38

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

type ListSessionsOutput

type ListSessionsOutput struct {
	Sessions []*sessions.Metadata `protobuf:"bytes,1,rep,name=Sessions" json:"Sessions,omitempty"`
}

func (*ListSessionsOutput) Descriptor

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

func (*ListSessionsOutput) GetSessions

func (m *ListSessionsOutput) GetSessions() []*sessions.Metadata

func (*ListSessionsOutput) ProtoMessage

func (*ListSessionsOutput) ProtoMessage()

func (*ListSessionsOutput) Reset

func (m *ListSessionsOutput) Reset()

func (*ListSessionsOutput) String

func (m *ListSessionsOutput) String() string

type MessagePublished added in v0.0.37

type MessagePublished struct {
	Recipient string `protobuf:"bytes,1,opt,name=Recipient" json:"Recipient,omitempty"`
	Topic     []byte `protobuf:"bytes,2,opt,name=Topic,proto3" json:"Topic,omitempty"`
	Qos       int32  `protobuf:"varint,3,opt,name=Qos" json:"Qos,omitempty"`
	Payload   []byte `protobuf:"bytes,4,opt,name=Payload,proto3" json:"Payload,omitempty"`
	Retained  bool   `protobuf:"varint,5,opt,name=Retained" json:"Retained,omitempty"`
	Dup       bool   `protobuf:"varint,6,opt,name=Dup" json:"Dup,omitempty"`
	Tenant    string `protobuf:"bytes,7,opt,name=Tenant" json:"Tenant,omitempty"`
}

func (*MessagePublished) Descriptor added in v0.0.37

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

func (*MessagePublished) GetDup added in v0.0.37

func (m *MessagePublished) GetDup() bool

func (*MessagePublished) GetPayload added in v0.0.37

func (m *MessagePublished) GetPayload() []byte

func (*MessagePublished) GetQos added in v0.0.37

func (m *MessagePublished) GetQos() int32

func (*MessagePublished) GetRecipient added in v0.0.37

func (m *MessagePublished) GetRecipient() string

func (*MessagePublished) GetRetained added in v0.0.37

func (m *MessagePublished) GetRetained() bool

func (*MessagePublished) GetTenant added in v0.0.40

func (m *MessagePublished) GetTenant() string

func (*MessagePublished) GetTopic added in v0.0.37

func (m *MessagePublished) GetTopic() []byte

func (*MessagePublished) ProtoMessage added in v0.0.37

func (*MessagePublished) ProtoMessage()

func (*MessagePublished) Reset added in v0.0.37

func (m *MessagePublished) Reset()

func (*MessagePublished) String added in v0.0.37

func (m *MessagePublished) String() string

type MessagePublishedOutput added in v0.0.37

type MessagePublishedOutput struct {
}

func (*MessagePublishedOutput) Descriptor added in v0.0.37

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

func (*MessagePublishedOutput) ProtoMessage added in v0.0.37

func (*MessagePublishedOutput) ProtoMessage()

func (*MessagePublishedOutput) Reset added in v0.0.37

func (m *MessagePublishedOutput) Reset()

func (*MessagePublishedOutput) String added in v0.0.37

func (m *MessagePublishedOutput) String() string

type Pool added in v0.0.37

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

func NewPool added in v0.0.37

func NewPool(addr string) (*Pool, error)

func (*Pool) Call added in v0.0.37

func (a *Pool) Call(job RPCJob) error

func (*Pool) Cancel added in v0.0.37

func (a *Pool) Cancel()

func (*Pool) Less

func (p *Pool) Less(remote btree.Item) bool

type RPCJob added in v0.0.37

type RPCJob func(BrokerServiceClient) error

type SessionFilter

type SessionFilter struct {
}

func (*SessionFilter) Descriptor

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

func (*SessionFilter) ProtoMessage

func (*SessionFilter) ProtoMessage()

func (*SessionFilter) Reset

func (m *SessionFilter) Reset()

func (*SessionFilter) String

func (m *SessionFilter) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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