protocol

package module
v0.0.0-...-157dae5 Latest Latest
Warning

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

Go to latest
Published: May 1, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeError byte = iota + 1
	TypePing
	TypeProduce
	TypeConsume
	TypeClose
)

Types for messages incoming over a data connection

Variables

View Source
var (
	ErrInvalidLengthGrpc        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGrpc          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGrpc = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	//ErrTopicExists is returned if a CreateTopic request is made to an existing topic
	ErrTopicExists = errors.New("topic already exists")
	//ErrTopicDoesNotExist is returned if a Request is made on a non existent topic
	ErrTopicDoesNotExist = errors.New("topic does not exist")
)

Functions

func Close

func Close(conn io.WriteCloser) error

Close sends a close message to the connection and closes the writer

func ErrorToResponse

func ErrorToResponse(conn io.Writer, err error)

ErrorToResponse converts a standard error to a response for data connection responses

func ExtendBuffer

func ExtendBuffer(buf *[]byte, n int)

ExtendBuffer increases a buffer's length if needed and returns a buffer of length n

func Ping

func Ping(conn io.ReadWriter) error

Ping sends a ping message to the connection

func ReadPrefix

func ReadPrefix(conn io.Reader, prefix []byte) (byte, uint32, error)

ReadPrefix reads the first 6 bytes of a data connection into the prefix and

interprets any response errors accordingly

func RegisterHaraqaServer

func RegisterHaraqaServer(s *grpc.Server, srv HaraqaServer)

Types

type ConsumeRequest

type ConsumeRequest struct {
	Topic  []byte
	Offset int64
	Limit  int64
}

ConsumeRequest is the request made to the broker by the client for a batch of messages from a topic starting at a given offset

func (*ConsumeRequest) Read

func (c *ConsumeRequest) Read(b []byte) error

func (*ConsumeRequest) Write

func (c *ConsumeRequest) Write(conn io.Writer) error

type ConsumeResponse

type ConsumeResponse struct {
	MsgSizes []int64
}

ConsumeResponse is the message from a broker to a client notifying of messages

being written to the data cannection and their respective sizes

func (*ConsumeResponse) Read

func (p *ConsumeResponse) Read(b []byte) error

func (*ConsumeResponse) Write

func (p *ConsumeResponse) Write(conn io.Writer) error

type CreateTopicRequest

type CreateTopicRequest struct {
	Topic []byte `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
}

func (*CreateTopicRequest) Descriptor

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

func (*CreateTopicRequest) GetTopic

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

func (*CreateTopicRequest) Marshal

func (m *CreateTopicRequest) Marshal() (dAtA []byte, err error)

func (*CreateTopicRequest) MarshalTo

func (m *CreateTopicRequest) MarshalTo(dAtA []byte) (int, error)

func (*CreateTopicRequest) MarshalToSizedBuffer

func (m *CreateTopicRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CreateTopicRequest) ProtoMessage

func (*CreateTopicRequest) ProtoMessage()

func (*CreateTopicRequest) Reset

func (m *CreateTopicRequest) Reset()

func (*CreateTopicRequest) Size

func (m *CreateTopicRequest) Size() (n int)

func (*CreateTopicRequest) String

func (m *CreateTopicRequest) String() string

func (*CreateTopicRequest) Unmarshal

func (m *CreateTopicRequest) Unmarshal(dAtA []byte) error

func (*CreateTopicRequest) XXX_DiscardUnknown

func (m *CreateTopicRequest) XXX_DiscardUnknown()

func (*CreateTopicRequest) XXX_Marshal

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

func (*CreateTopicRequest) XXX_Merge

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

func (*CreateTopicRequest) XXX_Size

func (m *CreateTopicRequest) XXX_Size() int

func (*CreateTopicRequest) XXX_Unmarshal

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

type CreateTopicResponse

type CreateTopicResponse struct {
	Meta *Meta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"`
}

func (*CreateTopicResponse) Descriptor

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

func (*CreateTopicResponse) GetMeta

func (m *CreateTopicResponse) GetMeta() *Meta

func (*CreateTopicResponse) Marshal

func (m *CreateTopicResponse) Marshal() (dAtA []byte, err error)

func (*CreateTopicResponse) MarshalTo

func (m *CreateTopicResponse) MarshalTo(dAtA []byte) (int, error)

func (*CreateTopicResponse) MarshalToSizedBuffer

func (m *CreateTopicResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CreateTopicResponse) ProtoMessage

func (*CreateTopicResponse) ProtoMessage()

func (*CreateTopicResponse) Reset

func (m *CreateTopicResponse) Reset()

func (*CreateTopicResponse) Size

func (m *CreateTopicResponse) Size() (n int)

func (*CreateTopicResponse) String

func (m *CreateTopicResponse) String() string

func (*CreateTopicResponse) Unmarshal

func (m *CreateTopicResponse) Unmarshal(dAtA []byte) error

func (*CreateTopicResponse) XXX_DiscardUnknown

func (m *CreateTopicResponse) XXX_DiscardUnknown()

func (*CreateTopicResponse) XXX_Marshal

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

func (*CreateTopicResponse) XXX_Merge

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

func (*CreateTopicResponse) XXX_Size

func (m *CreateTopicResponse) XXX_Size() int

func (*CreateTopicResponse) XXX_Unmarshal

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

type DeleteTopicRequest

type DeleteTopicRequest struct {
	Topic []byte `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
}

func (*DeleteTopicRequest) Descriptor

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

func (*DeleteTopicRequest) GetTopic

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

func (*DeleteTopicRequest) Marshal

func (m *DeleteTopicRequest) Marshal() (dAtA []byte, err error)

func (*DeleteTopicRequest) MarshalTo

func (m *DeleteTopicRequest) MarshalTo(dAtA []byte) (int, error)

func (*DeleteTopicRequest) MarshalToSizedBuffer

func (m *DeleteTopicRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DeleteTopicRequest) ProtoMessage

func (*DeleteTopicRequest) ProtoMessage()

func (*DeleteTopicRequest) Reset

func (m *DeleteTopicRequest) Reset()

func (*DeleteTopicRequest) Size

func (m *DeleteTopicRequest) Size() (n int)

func (*DeleteTopicRequest) String

func (m *DeleteTopicRequest) String() string

func (*DeleteTopicRequest) Unmarshal

func (m *DeleteTopicRequest) Unmarshal(dAtA []byte) error

func (*DeleteTopicRequest) XXX_DiscardUnknown

func (m *DeleteTopicRequest) XXX_DiscardUnknown()

func (*DeleteTopicRequest) XXX_Marshal

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

func (*DeleteTopicRequest) XXX_Merge

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

func (*DeleteTopicRequest) XXX_Size

func (m *DeleteTopicRequest) XXX_Size() int

func (*DeleteTopicRequest) XXX_Unmarshal

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

type DeleteTopicResponse

type DeleteTopicResponse struct {
	Meta *Meta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"`
}

func (*DeleteTopicResponse) Descriptor

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

func (*DeleteTopicResponse) GetMeta

func (m *DeleteTopicResponse) GetMeta() *Meta

func (*DeleteTopicResponse) Marshal

func (m *DeleteTopicResponse) Marshal() (dAtA []byte, err error)

func (*DeleteTopicResponse) MarshalTo

func (m *DeleteTopicResponse) MarshalTo(dAtA []byte) (int, error)

func (*DeleteTopicResponse) MarshalToSizedBuffer

func (m *DeleteTopicResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DeleteTopicResponse) ProtoMessage

func (*DeleteTopicResponse) ProtoMessage()

func (*DeleteTopicResponse) Reset

func (m *DeleteTopicResponse) Reset()

func (*DeleteTopicResponse) Size

func (m *DeleteTopicResponse) Size() (n int)

func (*DeleteTopicResponse) String

func (m *DeleteTopicResponse) String() string

func (*DeleteTopicResponse) Unmarshal

func (m *DeleteTopicResponse) Unmarshal(dAtA []byte) error

func (*DeleteTopicResponse) XXX_DiscardUnknown

func (m *DeleteTopicResponse) XXX_DiscardUnknown()

func (*DeleteTopicResponse) XXX_Marshal

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

func (*DeleteTopicResponse) XXX_Merge

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

func (*DeleteTopicResponse) XXX_Size

func (m *DeleteTopicResponse) XXX_Size() int

func (*DeleteTopicResponse) XXX_Unmarshal

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

type HaraqaClient

type HaraqaClient interface {
	// Sends a message to create a new topic
	CreateTopic(ctx context.Context, in *CreateTopicRequest, opts ...grpc.CallOption) (*CreateTopicResponse, error)
	// Sends a message to delete a topic
	DeleteTopic(ctx context.Context, in *DeleteTopicRequest, opts ...grpc.CallOption) (*DeleteTopicResponse, error)
	// Sends a message to truncate a topic to a specific point
	TruncateTopic(ctx context.Context, in *TruncateTopicRequest, opts ...grpc.CallOption) (*TruncateTopicResponse, error)
	// Sends a message to list all topics
	ListTopics(ctx context.Context, in *ListTopicsRequest, opts ...grpc.CallOption) (*ListTopicsResponse, error)
	// Sends a message to get a topics beginning and ending offsets
	Offsets(ctx context.Context, in *OffsetRequest, opts ...grpc.CallOption) (*OffsetResponse, error)
	// Streams requests for watching one or more topics, returns updated offsets
	WatchTopics(ctx context.Context, opts ...grpc.CallOption) (Haraqa_WatchTopicsClient, error)
	// Locks a consumer group, waits for an unlock
	Lock(ctx context.Context, opts ...grpc.CallOption) (Haraqa_LockClient, error)
}

HaraqaClient is the client API for Haraqa service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewHaraqaClient

func NewHaraqaClient(cc *grpc.ClientConn) HaraqaClient

type HaraqaServer

type HaraqaServer interface {
	// Sends a message to create a new topic
	CreateTopic(context.Context, *CreateTopicRequest) (*CreateTopicResponse, error)
	// Sends a message to delete a topic
	DeleteTopic(context.Context, *DeleteTopicRequest) (*DeleteTopicResponse, error)
	// Sends a message to truncate a topic to a specific point
	TruncateTopic(context.Context, *TruncateTopicRequest) (*TruncateTopicResponse, error)
	// Sends a message to list all topics
	ListTopics(context.Context, *ListTopicsRequest) (*ListTopicsResponse, error)
	// Sends a message to get a topics beginning and ending offsets
	Offsets(context.Context, *OffsetRequest) (*OffsetResponse, error)
	// Streams requests for watching one or more topics, returns updated offsets
	WatchTopics(Haraqa_WatchTopicsServer) error
	// Locks a consumer group, waits for an unlock
	Lock(Haraqa_LockServer) error
}

HaraqaServer is the server API for Haraqa service.

type Haraqa_LockClient

type Haraqa_LockClient interface {
	Send(*LockRequest) error
	Recv() (*LockResponse, error)
	grpc.ClientStream
}

type Haraqa_LockServer

type Haraqa_LockServer interface {
	Send(*LockResponse) error
	Recv() (*LockRequest, error)
	grpc.ServerStream
}

type Haraqa_WatchTopicsClient

type Haraqa_WatchTopicsClient interface {
	Send(*WatchRequest) error
	Recv() (*WatchResponse, error)
	grpc.ClientStream
}

type Haraqa_WatchTopicsServer

type Haraqa_WatchTopicsServer interface {
	Send(*WatchResponse) error
	Recv() (*WatchRequest, error)
	grpc.ServerStream
}

type ListTopicsRequest

type ListTopicsRequest struct {
	Prefix string `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"`
	Suffix string `protobuf:"bytes,2,opt,name=suffix,proto3" json:"suffix,omitempty"`
	Regex  string `protobuf:"bytes,3,opt,name=regex,proto3" json:"regex,omitempty"`
}

func (*ListTopicsRequest) Descriptor

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

func (*ListTopicsRequest) GetPrefix

func (m *ListTopicsRequest) GetPrefix() string

func (*ListTopicsRequest) GetRegex

func (m *ListTopicsRequest) GetRegex() string

func (*ListTopicsRequest) GetSuffix

func (m *ListTopicsRequest) GetSuffix() string

func (*ListTopicsRequest) Marshal

func (m *ListTopicsRequest) Marshal() (dAtA []byte, err error)

func (*ListTopicsRequest) MarshalTo

func (m *ListTopicsRequest) MarshalTo(dAtA []byte) (int, error)

func (*ListTopicsRequest) MarshalToSizedBuffer

func (m *ListTopicsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ListTopicsRequest) ProtoMessage

func (*ListTopicsRequest) ProtoMessage()

func (*ListTopicsRequest) Reset

func (m *ListTopicsRequest) Reset()

func (*ListTopicsRequest) Size

func (m *ListTopicsRequest) Size() (n int)

func (*ListTopicsRequest) String

func (m *ListTopicsRequest) String() string

func (*ListTopicsRequest) Unmarshal

func (m *ListTopicsRequest) Unmarshal(dAtA []byte) error

func (*ListTopicsRequest) XXX_DiscardUnknown

func (m *ListTopicsRequest) XXX_DiscardUnknown()

func (*ListTopicsRequest) XXX_Marshal

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

func (*ListTopicsRequest) XXX_Merge

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

func (*ListTopicsRequest) XXX_Size

func (m *ListTopicsRequest) XXX_Size() int

func (*ListTopicsRequest) XXX_Unmarshal

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

type ListTopicsResponse

type ListTopicsResponse struct {
	Meta   *Meta    `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"`
	Topics [][]byte `protobuf:"bytes,2,rep,name=topics,proto3" json:"topics,omitempty"`
}

func (*ListTopicsResponse) Descriptor

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

func (*ListTopicsResponse) GetMeta

func (m *ListTopicsResponse) GetMeta() *Meta

func (*ListTopicsResponse) GetTopics

func (m *ListTopicsResponse) GetTopics() [][]byte

func (*ListTopicsResponse) Marshal

func (m *ListTopicsResponse) Marshal() (dAtA []byte, err error)

func (*ListTopicsResponse) MarshalTo

func (m *ListTopicsResponse) MarshalTo(dAtA []byte) (int, error)

func (*ListTopicsResponse) MarshalToSizedBuffer

func (m *ListTopicsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ListTopicsResponse) ProtoMessage

func (*ListTopicsResponse) ProtoMessage()

func (*ListTopicsResponse) Reset

func (m *ListTopicsResponse) Reset()

func (*ListTopicsResponse) Size

func (m *ListTopicsResponse) Size() (n int)

func (*ListTopicsResponse) String

func (m *ListTopicsResponse) String() string

func (*ListTopicsResponse) Unmarshal

func (m *ListTopicsResponse) Unmarshal(dAtA []byte) error

func (*ListTopicsResponse) XXX_DiscardUnknown

func (m *ListTopicsResponse) XXX_DiscardUnknown()

func (*ListTopicsResponse) XXX_Marshal

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

func (*ListTopicsResponse) XXX_Merge

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

func (*ListTopicsResponse) XXX_Size

func (m *ListTopicsResponse) XXX_Size() int

func (*ListTopicsResponse) XXX_Unmarshal

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

type LockRequest

type LockRequest struct {
	Group []byte `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"`
	Time  int64  `protobuf:"varint,2,opt,name=time,proto3" json:"time,omitempty"`
	Lock  bool   `protobuf:"varint,3,opt,name=lock,proto3" json:"lock,omitempty"`
}

func (*LockRequest) Descriptor

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

func (*LockRequest) GetGroup

func (m *LockRequest) GetGroup() []byte

func (*LockRequest) GetLock

func (m *LockRequest) GetLock() bool

func (*LockRequest) GetTime

func (m *LockRequest) GetTime() int64

func (*LockRequest) Marshal

func (m *LockRequest) Marshal() (dAtA []byte, err error)

func (*LockRequest) MarshalTo

func (m *LockRequest) MarshalTo(dAtA []byte) (int, error)

func (*LockRequest) MarshalToSizedBuffer

func (m *LockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LockRequest) ProtoMessage

func (*LockRequest) ProtoMessage()

func (*LockRequest) Reset

func (m *LockRequest) Reset()

func (*LockRequest) Size

func (m *LockRequest) Size() (n int)

func (*LockRequest) String

func (m *LockRequest) String() string

func (*LockRequest) Unmarshal

func (m *LockRequest) Unmarshal(dAtA []byte) error

func (*LockRequest) XXX_DiscardUnknown

func (m *LockRequest) XXX_DiscardUnknown()

func (*LockRequest) XXX_Marshal

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

func (*LockRequest) XXX_Merge

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

func (*LockRequest) XXX_Size

func (m *LockRequest) XXX_Size() int

func (*LockRequest) XXX_Unmarshal

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

type LockResponse

type LockResponse struct {
	Meta   *Meta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"`
	Locked bool  `protobuf:"varint,2,opt,name=locked,proto3" json:"locked,omitempty"`
}

func (*LockResponse) Descriptor

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

func (*LockResponse) GetLocked

func (m *LockResponse) GetLocked() bool

func (*LockResponse) GetMeta

func (m *LockResponse) GetMeta() *Meta

func (*LockResponse) Marshal

func (m *LockResponse) Marshal() (dAtA []byte, err error)

func (*LockResponse) MarshalTo

func (m *LockResponse) MarshalTo(dAtA []byte) (int, error)

func (*LockResponse) MarshalToSizedBuffer

func (m *LockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LockResponse) ProtoMessage

func (*LockResponse) ProtoMessage()

func (*LockResponse) Reset

func (m *LockResponse) Reset()

func (*LockResponse) Size

func (m *LockResponse) Size() (n int)

func (*LockResponse) String

func (m *LockResponse) String() string

func (*LockResponse) Unmarshal

func (m *LockResponse) Unmarshal(dAtA []byte) error

func (*LockResponse) XXX_DiscardUnknown

func (m *LockResponse) XXX_DiscardUnknown()

func (*LockResponse) XXX_Marshal

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

func (*LockResponse) XXX_Merge

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

func (*LockResponse) XXX_Size

func (m *LockResponse) XXX_Size() int

func (*LockResponse) XXX_Unmarshal

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

type Meta

type Meta struct {
	OK       bool   `protobuf:"varint,1,opt,name=OK,proto3" json:"OK,omitempty"`
	ErrorMsg string `protobuf:"bytes,2,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"`
}

func (*Meta) Descriptor

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

func (*Meta) GetErrorMsg

func (m *Meta) GetErrorMsg() string

func (*Meta) GetOK

func (m *Meta) GetOK() bool

func (*Meta) Marshal

func (m *Meta) Marshal() (dAtA []byte, err error)

func (*Meta) MarshalTo

func (m *Meta) MarshalTo(dAtA []byte) (int, error)

func (*Meta) MarshalToSizedBuffer

func (m *Meta) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Meta) ProtoMessage

func (*Meta) ProtoMessage()

func (*Meta) Reset

func (m *Meta) Reset()

func (*Meta) Size

func (m *Meta) Size() (n int)

func (*Meta) String

func (m *Meta) String() string

func (*Meta) Unmarshal

func (m *Meta) Unmarshal(dAtA []byte) error

func (*Meta) XXX_DiscardUnknown

func (m *Meta) XXX_DiscardUnknown()

func (*Meta) XXX_Marshal

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

func (*Meta) XXX_Merge

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

func (*Meta) XXX_Size

func (m *Meta) XXX_Size() int

func (*Meta) XXX_Unmarshal

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

type OffsetRequest

type OffsetRequest struct {
	Topic []byte `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
}

The request message containing the offset info

func (*OffsetRequest) Descriptor

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

func (*OffsetRequest) GetTopic

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

func (*OffsetRequest) Marshal

func (m *OffsetRequest) Marshal() (dAtA []byte, err error)

func (*OffsetRequest) MarshalTo

func (m *OffsetRequest) MarshalTo(dAtA []byte) (int, error)

func (*OffsetRequest) MarshalToSizedBuffer

func (m *OffsetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*OffsetRequest) ProtoMessage

func (*OffsetRequest) ProtoMessage()

func (*OffsetRequest) Reset

func (m *OffsetRequest) Reset()

func (*OffsetRequest) Size

func (m *OffsetRequest) Size() (n int)

func (*OffsetRequest) String

func (m *OffsetRequest) String() string

func (*OffsetRequest) Unmarshal

func (m *OffsetRequest) Unmarshal(dAtA []byte) error

func (*OffsetRequest) XXX_DiscardUnknown

func (m *OffsetRequest) XXX_DiscardUnknown()

func (*OffsetRequest) XXX_Marshal

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

func (*OffsetRequest) XXX_Merge

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

func (*OffsetRequest) XXX_Size

func (m *OffsetRequest) XXX_Size() int

func (*OffsetRequest) XXX_Unmarshal

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

type OffsetResponse

type OffsetResponse struct {
	Meta      *Meta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"`
	MinOffset int64 `protobuf:"varint,2,opt,name=min_offset,json=minOffset,proto3" json:"min_offset,omitempty"`
	MaxOffset int64 `protobuf:"varint,3,opt,name=max_offset,json=maxOffset,proto3" json:"max_offset,omitempty"`
}

The response message containing the offset response

func (*OffsetResponse) Descriptor

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

func (*OffsetResponse) GetMaxOffset

func (m *OffsetResponse) GetMaxOffset() int64

func (*OffsetResponse) GetMeta

func (m *OffsetResponse) GetMeta() *Meta

func (*OffsetResponse) GetMinOffset

func (m *OffsetResponse) GetMinOffset() int64

func (*OffsetResponse) Marshal

func (m *OffsetResponse) Marshal() (dAtA []byte, err error)

func (*OffsetResponse) MarshalTo

func (m *OffsetResponse) MarshalTo(dAtA []byte) (int, error)

func (*OffsetResponse) MarshalToSizedBuffer

func (m *OffsetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*OffsetResponse) ProtoMessage

func (*OffsetResponse) ProtoMessage()

func (*OffsetResponse) Reset

func (m *OffsetResponse) Reset()

func (*OffsetResponse) Size

func (m *OffsetResponse) Size() (n int)

func (*OffsetResponse) String

func (m *OffsetResponse) String() string

func (*OffsetResponse) Unmarshal

func (m *OffsetResponse) Unmarshal(dAtA []byte) error

func (*OffsetResponse) XXX_DiscardUnknown

func (m *OffsetResponse) XXX_DiscardUnknown()

func (*OffsetResponse) XXX_Marshal

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

func (*OffsetResponse) XXX_Merge

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

func (*OffsetResponse) XXX_Size

func (m *OffsetResponse) XXX_Size() int

func (*OffsetResponse) XXX_Unmarshal

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

type ProduceRequest

type ProduceRequest struct {
	Topic    []byte
	MsgSizes []int64
}

ProduceRequest is a wrapper for the binary protocol for a produce message over a

data connection

func (*ProduceRequest) Read

func (p *ProduceRequest) Read(b []byte) error

Read is used in the broker for a ProduceRequest, it reads the given buffer and

populates the ProduceRequest's Topic and MsgSizes fields

func (*ProduceRequest) Write

func (p *ProduceRequest) Write(conn io.Writer) error

Write is called by the client to serialize a Produce request and write it to the connection

type TruncateTopicRequest

type TruncateTopicRequest struct {
	Topic  []byte `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
	Offset int64  `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
}

func (*TruncateTopicRequest) Descriptor

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

func (*TruncateTopicRequest) GetOffset

func (m *TruncateTopicRequest) GetOffset() int64

func (*TruncateTopicRequest) GetTopic

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

func (*TruncateTopicRequest) Marshal

func (m *TruncateTopicRequest) Marshal() (dAtA []byte, err error)

func (*TruncateTopicRequest) MarshalTo

func (m *TruncateTopicRequest) MarshalTo(dAtA []byte) (int, error)

func (*TruncateTopicRequest) MarshalToSizedBuffer

func (m *TruncateTopicRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TruncateTopicRequest) ProtoMessage

func (*TruncateTopicRequest) ProtoMessage()

func (*TruncateTopicRequest) Reset

func (m *TruncateTopicRequest) Reset()

func (*TruncateTopicRequest) Size

func (m *TruncateTopicRequest) Size() (n int)

func (*TruncateTopicRequest) String

func (m *TruncateTopicRequest) String() string

func (*TruncateTopicRequest) Unmarshal

func (m *TruncateTopicRequest) Unmarshal(dAtA []byte) error

func (*TruncateTopicRequest) XXX_DiscardUnknown

func (m *TruncateTopicRequest) XXX_DiscardUnknown()

func (*TruncateTopicRequest) XXX_Marshal

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

func (*TruncateTopicRequest) XXX_Merge

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

func (*TruncateTopicRequest) XXX_Size

func (m *TruncateTopicRequest) XXX_Size() int

func (*TruncateTopicRequest) XXX_Unmarshal

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

type TruncateTopicResponse

type TruncateTopicResponse struct {
	Meta *Meta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"`
}

func (*TruncateTopicResponse) Descriptor

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

func (*TruncateTopicResponse) GetMeta

func (m *TruncateTopicResponse) GetMeta() *Meta

func (*TruncateTopicResponse) Marshal

func (m *TruncateTopicResponse) Marshal() (dAtA []byte, err error)

func (*TruncateTopicResponse) MarshalTo

func (m *TruncateTopicResponse) MarshalTo(dAtA []byte) (int, error)

func (*TruncateTopicResponse) MarshalToSizedBuffer

func (m *TruncateTopicResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TruncateTopicResponse) ProtoMessage

func (*TruncateTopicResponse) ProtoMessage()

func (*TruncateTopicResponse) Reset

func (m *TruncateTopicResponse) Reset()

func (*TruncateTopicResponse) Size

func (m *TruncateTopicResponse) Size() (n int)

func (*TruncateTopicResponse) String

func (m *TruncateTopicResponse) String() string

func (*TruncateTopicResponse) Unmarshal

func (m *TruncateTopicResponse) Unmarshal(dAtA []byte) error

func (*TruncateTopicResponse) XXX_DiscardUnknown

func (m *TruncateTopicResponse) XXX_DiscardUnknown()

func (*TruncateTopicResponse) XXX_Marshal

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

func (*TruncateTopicResponse) XXX_Merge

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

func (*TruncateTopicResponse) XXX_Size

func (m *TruncateTopicResponse) XXX_Size() int

func (*TruncateTopicResponse) XXX_Unmarshal

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

type UnimplementedHaraqaServer

type UnimplementedHaraqaServer struct {
}

UnimplementedHaraqaServer can be embedded to have forward compatible implementations.

func (*UnimplementedHaraqaServer) CreateTopic

func (*UnimplementedHaraqaServer) DeleteTopic

func (*UnimplementedHaraqaServer) ListTopics

func (*UnimplementedHaraqaServer) Lock

func (*UnimplementedHaraqaServer) Offsets

func (*UnimplementedHaraqaServer) TruncateTopic

func (*UnimplementedHaraqaServer) WatchTopics

type WatchRequest

type WatchRequest struct {
	Topics [][]byte `protobuf:"bytes,1,rep,name=topics,proto3" json:"topics,omitempty"`
	Term   bool     `protobuf:"varint,2,opt,name=term,proto3" json:"term,omitempty"`
}

func (*WatchRequest) Descriptor

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

func (*WatchRequest) GetTerm

func (m *WatchRequest) GetTerm() bool

func (*WatchRequest) GetTopics

func (m *WatchRequest) GetTopics() [][]byte

func (*WatchRequest) Marshal

func (m *WatchRequest) Marshal() (dAtA []byte, err error)

func (*WatchRequest) MarshalTo

func (m *WatchRequest) MarshalTo(dAtA []byte) (int, error)

func (*WatchRequest) MarshalToSizedBuffer

func (m *WatchRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*WatchRequest) ProtoMessage

func (*WatchRequest) ProtoMessage()

func (*WatchRequest) Reset

func (m *WatchRequest) Reset()

func (*WatchRequest) Size

func (m *WatchRequest) Size() (n int)

func (*WatchRequest) String

func (m *WatchRequest) String() string

func (*WatchRequest) Unmarshal

func (m *WatchRequest) Unmarshal(dAtA []byte) error

func (*WatchRequest) XXX_DiscardUnknown

func (m *WatchRequest) XXX_DiscardUnknown()

func (*WatchRequest) XXX_Marshal

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

func (*WatchRequest) XXX_Merge

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

func (*WatchRequest) XXX_Size

func (m *WatchRequest) XXX_Size() int

func (*WatchRequest) XXX_Unmarshal

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

type WatchResponse

type WatchResponse struct {
	Meta      *Meta  `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"`
	Topic     []byte `protobuf:"bytes,2,opt,name=topic,proto3" json:"topic,omitempty"`
	MinOffset int64  `protobuf:"varint,3,opt,name=min_offset,json=minOffset,proto3" json:"min_offset,omitempty"`
	MaxOffset int64  `protobuf:"varint,4,opt,name=max_offset,json=maxOffset,proto3" json:"max_offset,omitempty"`
}

func (*WatchResponse) Descriptor

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

func (*WatchResponse) GetMaxOffset

func (m *WatchResponse) GetMaxOffset() int64

func (*WatchResponse) GetMeta

func (m *WatchResponse) GetMeta() *Meta

func (*WatchResponse) GetMinOffset

func (m *WatchResponse) GetMinOffset() int64

func (*WatchResponse) GetTopic

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

func (*WatchResponse) Marshal

func (m *WatchResponse) Marshal() (dAtA []byte, err error)

func (*WatchResponse) MarshalTo

func (m *WatchResponse) MarshalTo(dAtA []byte) (int, error)

func (*WatchResponse) MarshalToSizedBuffer

func (m *WatchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*WatchResponse) ProtoMessage

func (*WatchResponse) ProtoMessage()

func (*WatchResponse) Reset

func (m *WatchResponse) Reset()

func (*WatchResponse) Size

func (m *WatchResponse) Size() (n int)

func (*WatchResponse) String

func (m *WatchResponse) String() string

func (*WatchResponse) Unmarshal

func (m *WatchResponse) Unmarshal(dAtA []byte) error

func (*WatchResponse) XXX_DiscardUnknown

func (m *WatchResponse) XXX_DiscardUnknown()

func (*WatchResponse) XXX_Marshal

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

func (*WatchResponse) XXX_Merge

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

func (*WatchResponse) XXX_Size

func (m *WatchResponse) XXX_Size() int

func (*WatchResponse) XXX_Unmarshal

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

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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