pb

package
v0.0.0-...-be9c883 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package pb is a generated protocol buffer package.

It is generated from these files:

pb/api_definitions.proto
pb/metamorphosis.proto

It has these top-level messages:

CreateTopicRequest
CreateTopicResponse
ListTopicsRequest
ListTopicsResponse
TopicMetadata
PublishRequest
PublishResponse
SubscribeRequest
LogRecord
SubscribeResponse
LogEntry
LogSnapshot
TopicMetadataSnapshot
TopicMetadataOperation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthApiDefinitions = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowApiDefinitions   = fmt.Errorf("proto: integer overflow")
)
View Source
var (
	ErrInvalidLengthMetamorphosis = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMetamorphosis   = fmt.Errorf("proto: integer overflow")
)

Functions

func RegisterMetamorphosisMetadataServiceServer

func RegisterMetamorphosisMetadataServiceServer(s *grpc.Server, srv MetamorphosisMetadataServiceServer)

func RegisterMetamorphosisPubSubServiceServer

func RegisterMetamorphosisPubSubServiceServer(s *grpc.Server, srv MetamorphosisPubSubServiceServer)

Types

type CreateTopicRequest

type CreateTopicRequest struct {
	TopicName string `protobuf:"bytes,1,opt,name=TopicName,proto3" json:"TopicName,omitempty"`
}

func (*CreateTopicRequest) Descriptor

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

func (*CreateTopicRequest) Marshal

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

func (*CreateTopicRequest) MarshalTo

func (m *CreateTopicRequest) MarshalTo(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

type CreateTopicResponse

type CreateTopicResponse struct {
	Ok bool `protobuf:"varint,1,opt,name=Ok,proto3" json:"Ok,omitempty"`
}

func (*CreateTopicResponse) Descriptor

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

func (*CreateTopicResponse) Marshal

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

func (*CreateTopicResponse) MarshalTo

func (m *CreateTopicResponse) MarshalTo(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

type ListTopicsRequest

type ListTopicsRequest struct {
	NamePrefix string `protobuf:"bytes,1,opt,name=NamePrefix,proto3" json:"NamePrefix,omitempty"`
}

func (*ListTopicsRequest) Descriptor

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

func (*ListTopicsRequest) Marshal

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

func (*ListTopicsRequest) MarshalTo

func (m *ListTopicsRequest) MarshalTo(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

type ListTopicsResponse

type ListTopicsResponse struct {
	Metadata []*TopicMetadata `protobuf:"bytes,1,rep,name=metadata" json:"metadata,omitempty"`
}

func (*ListTopicsResponse) Descriptor

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

func (*ListTopicsResponse) Marshal

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

func (*ListTopicsResponse) MarshalTo

func (m *ListTopicsResponse) MarshalTo(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

type LogEntry

type LogEntry struct {
	Offset uint64 `protobuf:"varint,1,opt,name=Offset,proto3" json:"Offset,omitempty"`
	Key    []byte `protobuf:"bytes,2,opt,name=Key,proto3" json:"Key,omitempty"`
	Value  []byte `protobuf:"bytes,3,opt,name=Value,proto3" json:"Value,omitempty"`
	// This int enable metamorphosis to create a
	// unique context to wait for in the commit replay.
	// This way append can wait for changes to be committed.
	Context uint64 `protobuf:"varint,4,opt,name=Context,proto3" json:"Context,omitempty"`
}

func (*LogEntry) Descriptor

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

func (*LogEntry) Marshal

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

func (*LogEntry) MarshalTo

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

func (*LogEntry) ProtoMessage

func (*LogEntry) ProtoMessage()

func (*LogEntry) Reset

func (m *LogEntry) Reset()

func (*LogEntry) Size

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

func (*LogEntry) String

func (m *LogEntry) String() string

func (*LogEntry) Unmarshal

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

type LogRecord

type LogRecord struct {
	Offset uint64 `protobuf:"varint,1,opt,name=Offset,proto3" json:"Offset,omitempty"`
	Key    []byte `protobuf:"bytes,2,opt,name=Key,proto3" json:"Key,omitempty"`
	Value  []byte `protobuf:"bytes,3,opt,name=Value,proto3" json:"Value,omitempty"`
}

func (*LogRecord) Descriptor

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

func (*LogRecord) Marshal

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

func (*LogRecord) MarshalTo

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

func (*LogRecord) ProtoMessage

func (*LogRecord) ProtoMessage()

func (*LogRecord) Reset

func (m *LogRecord) Reset()

func (*LogRecord) Size

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

func (*LogRecord) String

func (m *LogRecord) String() string

func (*LogRecord) Unmarshal

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

type LogSnapshot

type LogSnapshot struct {
	// this map will contain keys and values from the log in compacted form
	State *LogSnapshot_SnapState `protobuf:"bytes,1,opt,name=State" json:"State,omitempty"`
	// this will contain all log entries with the map as base state
	Log []*LogEntry `protobuf:"bytes,2,rep,name=Log" json:"Log,omitempty"`
	// offsets are computed by the position of an intent in the log
	// plus the base offset from previous compactions
	BaseOffset uint64 `protobuf:"varint,3,opt,name=BaseOffset,proto3" json:"BaseOffset,omitempty"`
}

func (*LogSnapshot) Descriptor

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

func (*LogSnapshot) Marshal

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

func (*LogSnapshot) MarshalTo

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

func (*LogSnapshot) ProtoMessage

func (*LogSnapshot) ProtoMessage()

func (*LogSnapshot) Reset

func (m *LogSnapshot) Reset()

func (*LogSnapshot) Size

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

func (*LogSnapshot) String

func (m *LogSnapshot) String() string

func (*LogSnapshot) Unmarshal

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

type LogSnapshot_SnapState

type LogSnapshot_SnapState struct {
	M map[string][]byte `` /* 136-byte string literal not displayed */
}

func (*LogSnapshot_SnapState) Descriptor

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

func (*LogSnapshot_SnapState) Marshal

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

func (*LogSnapshot_SnapState) MarshalTo

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

func (*LogSnapshot_SnapState) ProtoMessage

func (*LogSnapshot_SnapState) ProtoMessage()

func (*LogSnapshot_SnapState) Reset

func (m *LogSnapshot_SnapState) Reset()

func (*LogSnapshot_SnapState) Size

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

func (*LogSnapshot_SnapState) String

func (m *LogSnapshot_SnapState) String() string

func (*LogSnapshot_SnapState) Unmarshal

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

type MetamorphosisMetadataServiceClient

type MetamorphosisMetadataServiceClient interface {
	// Creates a topic with the given name.
	// Returns an error if the topic already exists.
	CreateTopic(ctx context.Context, in *CreateTopicRequest, opts ...grpc.CallOption) (*CreateTopicResponse, error)
	ListTopics(ctx context.Context, in *ListTopicsRequest, opts ...grpc.CallOption) (*ListTopicsResponse, error)
}

func NewMetamorphosisMetadataServiceClient

func NewMetamorphosisMetadataServiceClient(cc *grpc.ClientConn) MetamorphosisMetadataServiceClient

type MetamorphosisMetadataServiceServer

type MetamorphosisMetadataServiceServer interface {
	// Creates a topic with the given name.
	// Returns an error if the topic already exists.
	CreateTopic(context.Context, *CreateTopicRequest) (*CreateTopicResponse, error)
	ListTopics(context.Context, *ListTopicsRequest) (*ListTopicsResponse, error)
}

type MetamorphosisPubSubServiceClient

type MetamorphosisPubSubServiceClient interface {
	Publish(ctx context.Context, opts ...grpc.CallOption) (MetamorphosisPubSubService_PublishClient, error)
	Subscribe(ctx context.Context, opts ...grpc.CallOption) (MetamorphosisPubSubService_SubscribeClient, error)
}

func NewMetamorphosisPubSubServiceClient

func NewMetamorphosisPubSubServiceClient(cc *grpc.ClientConn) MetamorphosisPubSubServiceClient

type MetamorphosisPubSubServiceServer

type MetamorphosisPubSubServiceServer interface {
	Publish(MetamorphosisPubSubService_PublishServer) error
	Subscribe(MetamorphosisPubSubService_SubscribeServer) error
}

type MetamorphosisPubSubService_PublishClient

type MetamorphosisPubSubService_PublishClient interface {
	Send(*PublishRequest) error
	Recv() (*PublishResponse, error)
	grpc.ClientStream
}

type MetamorphosisPubSubService_PublishServer

type MetamorphosisPubSubService_PublishServer interface {
	Send(*PublishResponse) error
	Recv() (*PublishRequest, error)
	grpc.ServerStream
}

type MetamorphosisPubSubService_SubscribeClient

type MetamorphosisPubSubService_SubscribeClient interface {
	Send(*SubscribeRequest) error
	Recv() (*SubscribeResponse, error)
	grpc.ClientStream
}

type MetamorphosisPubSubService_SubscribeServer

type MetamorphosisPubSubService_SubscribeServer interface {
	Send(*SubscribeResponse) error
	Recv() (*SubscribeRequest, error)
	grpc.ServerStream
}

type PublishRequest

type PublishRequest struct {
	Topic     string `protobuf:"bytes,1,opt,name=Topic,proto3" json:"Topic,omitempty"`
	EntryKey  []byte `protobuf:"bytes,2,opt,name=EntryKey,proto3" json:"EntryKey,omitempty"`
	EntryData []byte `protobuf:"bytes,3,opt,name=EntryData,proto3" json:"EntryData,omitempty"`
}

Sending a publish request starts a new publisher session on metamorphosis. The first request in the stream requires the topic field to be set. Failure to do so will fail the session. From then on the provided entry will be appended to the log. Setting the topic field to a different value will have no effect (the value of the field will be ignored after the first request for the duration of the session). In order to publish to a different topic the stream needs to be closed and a new stream needs to be created. When a topic is provided that doesn't exist, an error will be returned.

func (*PublishRequest) Descriptor

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

func (*PublishRequest) Marshal

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

func (*PublishRequest) MarshalTo

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

func (*PublishRequest) ProtoMessage

func (*PublishRequest) ProtoMessage()

func (*PublishRequest) Reset

func (m *PublishRequest) Reset()

func (*PublishRequest) Size

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

func (*PublishRequest) String

func (m *PublishRequest) String() string

func (*PublishRequest) Unmarshal

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

type PublishResponse

type PublishResponse struct {
	Error             string `protobuf:"bytes,1,opt,name=Error,proto3" json:"Error,omitempty"`
	CommittedEntryKey []byte `protobuf:"bytes,2,opt,name=CommittedEntryKey,proto3" json:"CommittedEntryKey,omitempty"`
	Offset            uint64 `protobuf:"varint,3,opt,name=Offset,proto3" json:"Offset,omitempty"`
}

For each publish request a corresponding response will be sent. The response will contain the entry key that has been committed by metamorphosis.

func (*PublishResponse) Descriptor

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

func (*PublishResponse) Marshal

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

func (*PublishResponse) MarshalTo

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

func (*PublishResponse) ProtoMessage

func (*PublishResponse) ProtoMessage()

func (*PublishResponse) Reset

func (m *PublishResponse) Reset()

func (*PublishResponse) Size

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

func (*PublishResponse) String

func (m *PublishResponse) String() string

func (*PublishResponse) Unmarshal

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

type SubscribeRequest

type SubscribeRequest struct {
	Topic             string `protobuf:"bytes,1,opt,name=Topic,proto3" json:"Topic,omitempty"`
	StartingOffset    uint64 `protobuf:"varint,2,opt,name=StartingOffset,proto3" json:"StartingOffset,omitempty"`
	CommittedEntryKey []byte `protobuf:"bytes,3,opt,name=CommittedEntryKey,proto3" json:"CommittedEntryKey,omitempty"`
}

Sending a subcribe request starts a new subscription session on metamorphosis. The first request in the stream requires the topic and starting entry key fields to be set. The subcription topic is valid over the life time of the entire session and the value of the topic field will be ignored in subsequent requests in the stream. Failure to provide the name of an existing topic will result in closing the session with an error. The starting entry key is the entry at which the log will be read. The committed entry key field defines the place at which the log be started read within this session. metamorphosis is free to discard entries that have been read by a session whenever it seems fit. Failure to provide a reasonable combination of starting entry and committed entry will result in a failure and close of the session.

func (*SubscribeRequest) Descriptor

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

func (*SubscribeRequest) Marshal

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

func (*SubscribeRequest) MarshalTo

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

func (*SubscribeRequest) ProtoMessage

func (*SubscribeRequest) ProtoMessage()

func (*SubscribeRequest) Reset

func (m *SubscribeRequest) Reset()

func (*SubscribeRequest) Size

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

func (*SubscribeRequest) String

func (m *SubscribeRequest) String() string

func (*SubscribeRequest) Unmarshal

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

type SubscribeResponse

type SubscribeResponse struct {
	Error   string       `protobuf:"bytes,1,opt,name=Error,proto3" json:"Error,omitempty"`
	Records []*LogRecord `protobuf:"bytes,2,rep,name=records" json:"records,omitempty"`
}

func (*SubscribeResponse) Descriptor

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

func (*SubscribeResponse) Marshal

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

func (*SubscribeResponse) MarshalTo

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

func (*SubscribeResponse) ProtoMessage

func (*SubscribeResponse) ProtoMessage()

func (*SubscribeResponse) Reset

func (m *SubscribeResponse) Reset()

func (*SubscribeResponse) Size

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

func (*SubscribeResponse) String

func (m *SubscribeResponse) String() string

func (*SubscribeResponse) Unmarshal

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

type TopicMetadata

type TopicMetadata struct {
	Name  string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
	Size_ uint64 `protobuf:"varint,2,opt,name=Size,proto3" json:"Size,omitempty"`
}

func (*TopicMetadata) Descriptor

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

func (*TopicMetadata) Marshal

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

func (*TopicMetadata) MarshalTo

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

func (*TopicMetadata) ProtoMessage

func (*TopicMetadata) ProtoMessage()

func (*TopicMetadata) Reset

func (m *TopicMetadata) Reset()

func (*TopicMetadata) Size

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

func (*TopicMetadata) String

func (m *TopicMetadata) String() string

func (*TopicMetadata) Unmarshal

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

type TopicMetadataOperation

type TopicMetadataOperation struct {
	Name            string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
	DataStructureId string `protobuf:"bytes,2,opt,name=DataStructureId,proto3" json:"DataStructureId,omitempty"`
}

func (*TopicMetadataOperation) Descriptor

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

func (*TopicMetadataOperation) Marshal

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

func (*TopicMetadataOperation) MarshalTo

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

func (*TopicMetadataOperation) ProtoMessage

func (*TopicMetadataOperation) ProtoMessage()

func (*TopicMetadataOperation) Reset

func (m *TopicMetadataOperation) Reset()

func (*TopicMetadataOperation) Size

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

func (*TopicMetadataOperation) String

func (m *TopicMetadataOperation) String() string

func (*TopicMetadataOperation) Unmarshal

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

type TopicMetadataSnapshot

type TopicMetadataSnapshot struct {
	TopicNameToDataStructureId map[string]string `` /* 186-byte string literal not displayed */
}

func (*TopicMetadataSnapshot) Descriptor

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

func (*TopicMetadataSnapshot) Marshal

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

func (*TopicMetadataSnapshot) MarshalTo

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

func (*TopicMetadataSnapshot) ProtoMessage

func (*TopicMetadataSnapshot) ProtoMessage()

func (*TopicMetadataSnapshot) Reset

func (m *TopicMetadataSnapshot) Reset()

func (*TopicMetadataSnapshot) Size

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

func (*TopicMetadataSnapshot) String

func (m *TopicMetadataSnapshot) String() string

func (*TopicMetadataSnapshot) Unmarshal

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

Jump to

Keyboard shortcuts

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