pb

package
v0.0.0-...-fb6610c Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package pb is a generated protocol buffer package.

It is generated from these files:

vinna.proto

It has these top-level messages:

Topic
TopicCreated
Message
Success
MessageRequest
ProducerSummary
ConsumeRequest

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterVinnaServer

func RegisterVinnaServer(s *grpc.Server, srv VinnaServer)

Types

type ConsumeRequest

type ConsumeRequest struct {
	Topic string `protobuf:"bytes,1,opt,name=topic" json:"topic,omitempty"`
}

func (*ConsumeRequest) Descriptor

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

func (*ConsumeRequest) GetTopic

func (m *ConsumeRequest) GetTopic() string

func (*ConsumeRequest) ProtoMessage

func (*ConsumeRequest) ProtoMessage()

func (*ConsumeRequest) Reset

func (m *ConsumeRequest) Reset()

func (*ConsumeRequest) String

func (m *ConsumeRequest) String() string

type Message

type Message struct {
	Uuid  string `protobuf:"bytes,1,opt,name=uuid" json:"uuid,omitempty"`
	Topic string `protobuf:"bytes,2,opt,name=topic" json:"topic,omitempty"`
	Msg   []byte `protobuf:"bytes,3,opt,name=msg,proto3" json:"msg,omitempty"`
}

func (*Message) Descriptor

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

func (*Message) GetMsg

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

func (*Message) GetTopic

func (m *Message) GetTopic() string

func (*Message) GetUuid

func (m *Message) GetUuid() string

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) Reset

func (m *Message) Reset()

func (*Message) String

func (m *Message) String() string

type MessageRequest

type MessageRequest struct {
	Topic string `protobuf:"bytes,1,opt,name=topic" json:"topic,omitempty"`
	MsgID string `protobuf:"bytes,2,opt,name=msgID" json:"msgID,omitempty"`
}

func (*MessageRequest) Descriptor

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

func (*MessageRequest) GetMsgID

func (m *MessageRequest) GetMsgID() string

func (*MessageRequest) GetTopic

func (m *MessageRequest) GetTopic() string

func (*MessageRequest) ProtoMessage

func (*MessageRequest) ProtoMessage()

func (*MessageRequest) Reset

func (m *MessageRequest) Reset()

func (*MessageRequest) String

func (m *MessageRequest) String() string

type ProducerSummary

type ProducerSummary struct {
	MsgCount    int32 `protobuf:"varint,1,opt,name=msgCount" json:"msgCount,omitempty"`
	TopicCount  int32 `protobuf:"varint,2,opt,name=topicCount" json:"topicCount,omitempty"`
	ElapsedTime int32 `protobuf:"varint,3,opt,name=elapsedTime" json:"elapsedTime,omitempty"`
}

func (*ProducerSummary) Descriptor

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

func (*ProducerSummary) GetElapsedTime

func (m *ProducerSummary) GetElapsedTime() int32

func (*ProducerSummary) GetMsgCount

func (m *ProducerSummary) GetMsgCount() int32

func (*ProducerSummary) GetTopicCount

func (m *ProducerSummary) GetTopicCount() int32

func (*ProducerSummary) ProtoMessage

func (*ProducerSummary) ProtoMessage()

func (*ProducerSummary) Reset

func (m *ProducerSummary) Reset()

func (*ProducerSummary) String

func (m *ProducerSummary) String() string

type Success

type Success struct {
	MsgID   string `protobuf:"bytes,1,opt,name=msgID" json:"msgID,omitempty"`
	Success bool   `protobuf:"varint,2,opt,name=success" json:"success,omitempty"`
}

func (*Success) Descriptor

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

func (*Success) GetMsgID

func (m *Success) GetMsgID() string

func (*Success) GetSuccess

func (m *Success) GetSuccess() bool

func (*Success) ProtoMessage

func (*Success) ProtoMessage()

func (*Success) Reset

func (m *Success) Reset()

func (*Success) String

func (m *Success) String() string

type Topic

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

func (*Topic) Descriptor

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

func (*Topic) GetTopic

func (m *Topic) GetTopic() string

func (*Topic) ProtoMessage

func (*Topic) ProtoMessage()

func (*Topic) Reset

func (m *Topic) Reset()

func (*Topic) String

func (m *Topic) String() string

type TopicCreated

type TopicCreated struct {
	Success bool `protobuf:"varint,1,opt,name=success" json:"success,omitempty"`
}

func (*TopicCreated) Descriptor

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

func (*TopicCreated) GetSuccess

func (m *TopicCreated) GetSuccess() bool

func (*TopicCreated) ProtoMessage

func (*TopicCreated) ProtoMessage()

func (*TopicCreated) Reset

func (m *TopicCreated) Reset()

func (*TopicCreated) String

func (m *TopicCreated) String() string

type VinnaClient

type VinnaClient interface {
	// NewTopic will create a new topic for messages
	NewTopic(ctx context.Context, in *Topic, opts ...grpc.CallOption) (*TopicCreated, error)
	// Add a message to vinna
	Add(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Success, error)
	// Take a message from vinna
	Take(ctx context.Context, in *MessageRequest, opts ...grpc.CallOption) (*Message, error)
	// Produce will open up a production stream of data
	Produce(ctx context.Context, opts ...grpc.CallOption) (Vinna_ProduceClient, error)
	// Consumer will be an endpoint for streaming data to a client side consumer
	Consume(ctx context.Context, in *ConsumeRequest, opts ...grpc.CallOption) (Vinna_ConsumeClient, error)
}

func NewVinnaClient

func NewVinnaClient(cc *grpc.ClientConn) VinnaClient

type VinnaServer

type VinnaServer interface {
	// NewTopic will create a new topic for messages
	NewTopic(context.Context, *Topic) (*TopicCreated, error)
	// Add a message to vinna
	Add(context.Context, *Message) (*Success, error)
	// Take a message from vinna
	Take(context.Context, *MessageRequest) (*Message, error)
	// Produce will open up a production stream of data
	Produce(Vinna_ProduceServer) error
	// Consumer will be an endpoint for streaming data to a client side consumer
	Consume(*ConsumeRequest, Vinna_ConsumeServer) error
}

type Vinna_ConsumeClient

type Vinna_ConsumeClient interface {
	Recv() (*Message, error)
	grpc.ClientStream
}

type Vinna_ConsumeServer

type Vinna_ConsumeServer interface {
	Send(*Message) error
	grpc.ServerStream
}

type Vinna_ProduceClient

type Vinna_ProduceClient interface {
	Send(*Message) error
	CloseAndRecv() (*ProducerSummary, error)
	grpc.ClientStream
}

type Vinna_ProduceServer

type Vinna_ProduceServer interface {
	SendAndClose(*ProducerSummary) error
	Recv() (*Message, error)
	grpc.ServerStream
}

Jump to

Keyboard shortcuts

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