proto

package
v0.0.0-...-466853b Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package proto is a generated protocol buffer package.

It is generated from these files:

topic.proto
registry.proto

It has these top-level messages:

Empty
NewMessage
Message
NewTopic
Topic
TopicStatus

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterRegistryServiceServer

func RegisterRegistryServiceServer(s *grpc.Server, srv RegistryServiceServer)

func RegisterTopicServiceServer

func RegisterTopicServiceServer(s *grpc.Server, srv TopicServiceServer)

Types

type Empty

type Empty struct {
}

Empty response.

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

type Message

type Message struct {
	Group string `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"`
	// @inject_tag: valid:"required"
	Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty" valid:"required"`
}

func (*Message) Descriptor

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

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) Reset

func (m *Message) Reset()

func (*Message) String

func (m *Message) String() string

type NewMessage

type NewMessage struct {
	// Topic name.
	// @inject_tag: valid:"required"
	Topic string `protobuf:"bytes,1,opt,name=topic" json:"topic,omitempty" valid:"required"`
	// Message to send to the topic.
	// @inject_tag: valid:"required"
	Message *Message `protobuf:"bytes,2,opt,name=message" json:"message,omitempty" valid:"required"`
}

NewMessage is used to put an item in a topic.

func (*NewMessage) Descriptor

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

func (*NewMessage) GetMessage

func (m *NewMessage) GetMessage() *Message

func (*NewMessage) ProtoMessage

func (*NewMessage) ProtoMessage()

func (*NewMessage) Reset

func (m *NewMessage) Reset()

func (*NewMessage) String

func (m *NewMessage) String() string

type NewTopic

type NewTopic struct {
	// Topic name.
	// @inject_tag: valid:"required"
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty" valid:"required"`
	// Backend used by this topic.
	// @inject_tag: valid:"required"
	Backend string `protobuf:"bytes,2,opt,name=backend" json:"backend,omitempty" valid:"required"`
}

func (*NewTopic) Descriptor

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

func (*NewTopic) ProtoMessage

func (*NewTopic) ProtoMessage()

func (*NewTopic) Reset

func (m *NewTopic) Reset()

func (*NewTopic) String

func (m *NewTopic) String() string

type RegistryServiceClient

type RegistryServiceClient interface {
	Create(ctx context.Context, in *NewTopic, opts ...grpc.CallOption) (*Empty, error)
	Status(ctx context.Context, in *Topic, opts ...grpc.CallOption) (*TopicStatus, error)
}

func NewRegistryServiceClient

func NewRegistryServiceClient(cc *grpc.ClientConn) RegistryServiceClient

type RegistryServiceServer

type RegistryServiceServer interface {
	Create(context.Context, *NewTopic) (*Empty, error)
	Status(context.Context, *Topic) (*TopicStatus, error)
}

type Topic

type Topic struct {
	// Topic name.
	// @inject_tag: valid:"required"
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty" valid:"required"`
	// Backend used by this topic.
	Backend string `protobuf:"bytes,2,opt,name=backend" json:"backend,omitempty"`
}

func (*Topic) Descriptor

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

func (*Topic) ProtoMessage

func (*Topic) ProtoMessage()

func (*Topic) Reset

func (m *Topic) Reset()

func (*Topic) String

func (m *Topic) String() string

type TopicServiceClient

type TopicServiceClient interface {
	// Send message to the topic.
	Send(ctx context.Context, in *NewMessage, opts ...grpc.CallOption) (*Empty, error)
}

func NewTopicServiceClient

func NewTopicServiceClient(cc *grpc.ClientConn) TopicServiceClient

type TopicServiceServer

type TopicServiceServer interface {
	// Send message to the topic.
	Send(context.Context, *NewMessage) (*Empty, error)
}

type TopicStatus

type TopicStatus struct {
	Exists bool `protobuf:"varint,1,opt,name=exists" json:"exists,omitempty"`
}

func (*TopicStatus) Descriptor

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

func (*TopicStatus) ProtoMessage

func (*TopicStatus) ProtoMessage()

func (*TopicStatus) Reset

func (m *TopicStatus) Reset()

func (*TopicStatus) String

func (m *TopicStatus) String() string

Jump to

Keyboard shortcuts

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