kafka

package
v0.0.0-...-f834482 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterKafkaProducerHandler

func RegisterKafkaProducerHandler(s server.Server, hdlr KafkaProducerHandler, opts ...server.HandlerOption) error

Types

type KafkaProducerHandler

type KafkaProducerHandler interface {
	SinglePublish(context.Context, *MessageRequest, *MessageResponse) error
	MultiPublish(context.Context, KafkaProducer_MultiPublishStream) error
}

type KafkaProducerService

type KafkaProducerService interface {
	SinglePublish(ctx context.Context, in *MessageRequest, opts ...client.CallOption) (*MessageResponse, error)
	MultiPublish(ctx context.Context, opts ...client.CallOption) (KafkaProducer_MultiPublishService, error)
}

func NewKafkaProducerService

func NewKafkaProducerService(name string, c client.Client) KafkaProducerService

type KafkaProducer_MultiPublishService

type KafkaProducer_MultiPublishService interface {
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	Close() error
	Send(*MessageRequest) error
	Recv() (*MessageResponse, error)
}

type KafkaProducer_MultiPublishStream

type KafkaProducer_MultiPublishStream interface {
	SendMsg(interface{}) error
	RecvMsg(interface{}) error
	Close() error
	Send(*MessageResponse) error
	Recv() (*MessageRequest, error)
}

type MessageRequest

type MessageRequest struct {
	Version              int32    `protobuf:"varint,1,opt,name=Version,proto3" json:"Version,omitempty"`
	MessageId            string   `protobuf:"bytes,2,opt,name=MessageId,proto3" json:"MessageId,omitempty"`
	ClientId             string   `protobuf:"bytes,3,opt,name=ClientId,proto3" json:"ClientId,omitempty"`
	Key                  string   `protobuf:"bytes,4,opt,name=Key,proto3" json:"Key,omitempty"`
	MessageBody          []byte   `protobuf:"bytes,5,opt,name=MessageBody,proto3" json:"MessageBody,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

定义参数

func (*MessageRequest) Descriptor

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

func (*MessageRequest) GetClientId

func (m *MessageRequest) GetClientId() string

func (*MessageRequest) GetKey

func (m *MessageRequest) GetKey() string

func (*MessageRequest) GetMessageBody

func (m *MessageRequest) GetMessageBody() []byte

func (*MessageRequest) GetMessageId

func (m *MessageRequest) GetMessageId() string

func (*MessageRequest) GetVersion

func (m *MessageRequest) GetVersion() int32

func (*MessageRequest) ProtoMessage

func (*MessageRequest) ProtoMessage()

func (*MessageRequest) Reset

func (m *MessageRequest) Reset()

func (*MessageRequest) String

func (m *MessageRequest) String() string

func (*MessageRequest) XXX_DiscardUnknown

func (m *MessageRequest) XXX_DiscardUnknown()

func (*MessageRequest) XXX_Marshal

func (m *MessageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MessageRequest) XXX_Merge

func (m *MessageRequest) XXX_Merge(src proto.Message)

func (*MessageRequest) XXX_Size

func (m *MessageRequest) XXX_Size() int

func (*MessageRequest) XXX_Unmarshal

func (m *MessageRequest) XXX_Unmarshal(b []byte) error

type MessageResponse

type MessageResponse struct {
	Code                 int32    `protobuf:"varint,1,opt,name=Code,proto3" json:"Code,omitempty"`
	Message              string   `protobuf:"bytes,2,opt,name=Message,proto3" json:"Message,omitempty"`
	MessageId            string   `protobuf:"bytes,3,opt,name=MessageId,proto3" json:"MessageId,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*MessageResponse) Descriptor

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

func (*MessageResponse) GetCode

func (m *MessageResponse) GetCode() int32

func (*MessageResponse) GetMessage

func (m *MessageResponse) GetMessage() string

func (*MessageResponse) GetMessageId

func (m *MessageResponse) GetMessageId() string

func (*MessageResponse) ProtoMessage

func (*MessageResponse) ProtoMessage()

func (*MessageResponse) Reset

func (m *MessageResponse) Reset()

func (*MessageResponse) String

func (m *MessageResponse) String() string

func (*MessageResponse) XXX_DiscardUnknown

func (m *MessageResponse) XXX_DiscardUnknown()

func (*MessageResponse) XXX_Marshal

func (m *MessageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MessageResponse) XXX_Merge

func (m *MessageResponse) XXX_Merge(src proto.Message)

func (*MessageResponse) XXX_Size

func (m *MessageResponse) XXX_Size() int

func (*MessageResponse) XXX_Unmarshal

func (m *MessageResponse) XXX_Unmarshal(b []byte) error

type ProducerService

type ProducerService struct {
}

func (*ProducerService) MultiPublish

func (*ProducerService) SinglePublish

func (s *ProducerService) SinglePublish(ctx context.Context, in *MessageRequest, out *MessageResponse) error

Jump to

Keyboard shortcuts

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