server

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterProducerServer

func RegisterProducerServer(s *grpc.Server, srv ProducerServer)

func Start

func Start(kafkaURL, topic, grpcPort string, provider types.Provider)

Start gRPC Server with Kafka connection.

Types

type ProducerClient

type ProducerClient interface {
	Publish(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Reply, error)
}

func NewProducerClient

func NewProducerClient(cc *grpc.ClientConn) ProducerClient

type ProducerServer

type ProducerServer interface {
	Publish(context.Context, *Request) (*Reply, error)
}

type Reply

type Reply struct {
	Message string `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"`
}

func (*Reply) Descriptor

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

func (*Reply) GetMessage

func (m *Reply) GetMessage() string

func (*Reply) ProtoMessage

func (*Reply) ProtoMessage()

func (*Reply) Reset

func (m *Reply) Reset()

func (*Reply) String

func (m *Reply) String() string

type Request

type Request struct {
	Message string `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"`
}

func (*Request) Descriptor

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

func (*Request) GetMessage

func (m *Request) GetMessage() string

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) Reset

func (m *Request) Reset()

func (*Request) String

func (m *Request) String() string

Jump to

Keyboard shortcuts

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