Documentation ¶
Overview ¶
Package databroker contains databroker protobuf definitions.
Index ¶
- Variables
- func RegisterDataBrokerServiceServer(s *grpc.Server, srv DataBrokerServiceServer)
- type AcquireLeaseRequest
- func (*AcquireLeaseRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AcquireLeaseRequest) GetDuration() *durationpb.Duration
- func (x *AcquireLeaseRequest) GetName() string
- func (*AcquireLeaseRequest) ProtoMessage()
- func (x *AcquireLeaseRequest) ProtoReflect() protoreflect.Message
- func (x *AcquireLeaseRequest) Reset()
- func (x *AcquireLeaseRequest) String() string
- type AcquireLeaseResponse
- func (*AcquireLeaseResponse) Descriptor() ([]byte, []int)deprecated
- func (x *AcquireLeaseResponse) GetId() string
- func (*AcquireLeaseResponse) ProtoMessage()
- func (x *AcquireLeaseResponse) ProtoReflect() protoreflect.Message
- func (x *AcquireLeaseResponse) Reset()
- func (x *AcquireLeaseResponse) String() string
- type DataBrokerServiceClient
- type DataBrokerServiceServer
- type DataBrokerService_SyncClient
- type DataBrokerService_SyncLatestClient
- type DataBrokerService_SyncLatestServer
- type DataBrokerService_SyncServer
- type GetRequest
- type GetResponse
- type Leaser
- type LeaserHandler
- type Options
- type PutRequest
- type PutResponse
- func (*PutResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PutResponse) GetRecord() *Record
- func (x *PutResponse) GetServerVersion() uint64
- func (*PutResponse) ProtoMessage()
- func (x *PutResponse) ProtoReflect() protoreflect.Message
- func (x *PutResponse) Reset()
- func (x *PutResponse) String() string
- type QueryRequest
- func (*QueryRequest) Descriptor() ([]byte, []int)deprecated
- func (x *QueryRequest) GetLimit() int64
- func (x *QueryRequest) GetOffset() int64
- func (x *QueryRequest) GetQuery() string
- func (x *QueryRequest) GetType() string
- func (*QueryRequest) ProtoMessage()
- func (x *QueryRequest) ProtoReflect() protoreflect.Message
- func (x *QueryRequest) Reset()
- func (x *QueryRequest) String() string
- type QueryResponse
- func (*QueryResponse) Descriptor() ([]byte, []int)deprecated
- func (x *QueryResponse) GetRecords() []*Record
- func (x *QueryResponse) GetTotalCount() int64
- func (*QueryResponse) ProtoMessage()
- func (x *QueryResponse) ProtoReflect() protoreflect.Message
- func (x *QueryResponse) Reset()
- func (x *QueryResponse) String() string
- type Record
- func (*Record) Descriptor() ([]byte, []int)deprecated
- func (x *Record) GetData() *anypb.Any
- func (x *Record) GetDeletedAt() *timestamppb.Timestamp
- func (x *Record) GetId() string
- func (x *Record) GetModifiedAt() *timestamppb.Timestamp
- func (x *Record) GetType() string
- func (x *Record) GetVersion() uint64
- func (*Record) ProtoMessage()
- func (x *Record) ProtoReflect() protoreflect.Message
- func (x *Record) Reset()
- func (x *Record) String() string
- type ReleaseLeaseRequest
- func (*ReleaseLeaseRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ReleaseLeaseRequest) GetId() string
- func (x *ReleaseLeaseRequest) GetName() string
- func (*ReleaseLeaseRequest) ProtoMessage()
- func (x *ReleaseLeaseRequest) ProtoReflect() protoreflect.Message
- func (x *ReleaseLeaseRequest) Reset()
- func (x *ReleaseLeaseRequest) String() string
- type RenewLeaseRequest
- func (*RenewLeaseRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RenewLeaseRequest) GetDuration() *durationpb.Duration
- func (x *RenewLeaseRequest) GetId() string
- func (x *RenewLeaseRequest) GetName() string
- func (*RenewLeaseRequest) ProtoMessage()
- func (x *RenewLeaseRequest) ProtoReflect() protoreflect.Message
- func (x *RenewLeaseRequest) Reset()
- func (x *RenewLeaseRequest) String() string
- type SetOptionsRequest
- func (*SetOptionsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SetOptionsRequest) GetOptions() *Options
- func (x *SetOptionsRequest) GetType() string
- func (*SetOptionsRequest) ProtoMessage()
- func (x *SetOptionsRequest) ProtoReflect() protoreflect.Message
- func (x *SetOptionsRequest) Reset()
- func (x *SetOptionsRequest) String() string
- type SetOptionsResponse
- func (*SetOptionsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SetOptionsResponse) GetOptions() *Options
- func (*SetOptionsResponse) ProtoMessage()
- func (x *SetOptionsResponse) ProtoReflect() protoreflect.Message
- func (x *SetOptionsResponse) Reset()
- func (x *SetOptionsResponse) String() string
- type SyncLatestRequest
- type SyncLatestResponse
- func (*SyncLatestResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SyncLatestResponse) GetRecord() *Record
- func (m *SyncLatestResponse) GetResponse() isSyncLatestResponse_Response
- func (x *SyncLatestResponse) GetVersions() *Versions
- func (*SyncLatestResponse) ProtoMessage()
- func (x *SyncLatestResponse) ProtoReflect() protoreflect.Message
- func (x *SyncLatestResponse) Reset()
- func (x *SyncLatestResponse) String() string
- type SyncLatestResponse_Record
- type SyncLatestResponse_Versions
- type SyncRequest
- func (*SyncRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SyncRequest) GetRecordVersion() uint64
- func (x *SyncRequest) GetServerVersion() uint64
- func (*SyncRequest) ProtoMessage()
- func (x *SyncRequest) ProtoReflect() protoreflect.Message
- func (x *SyncRequest) Reset()
- func (x *SyncRequest) String() string
- type SyncResponse
- type Syncer
- type SyncerHandler
- type SyncerOption
- type UnimplementedDataBrokerServiceServer
- func (*UnimplementedDataBrokerServiceServer) AcquireLease(context.Context, *AcquireLeaseRequest) (*AcquireLeaseResponse, error)
- func (*UnimplementedDataBrokerServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error)
- func (*UnimplementedDataBrokerServiceServer) Put(context.Context, *PutRequest) (*PutResponse, error)
- func (*UnimplementedDataBrokerServiceServer) Query(context.Context, *QueryRequest) (*QueryResponse, error)
- func (*UnimplementedDataBrokerServiceServer) ReleaseLease(context.Context, *ReleaseLeaseRequest) (*emptypb.Empty, error)
- func (*UnimplementedDataBrokerServiceServer) RenewLease(context.Context, *RenewLeaseRequest) (*emptypb.Empty, error)
- func (*UnimplementedDataBrokerServiceServer) SetOptions(context.Context, *SetOptionsRequest) (*SetOptionsResponse, error)
- func (*UnimplementedDataBrokerServiceServer) Sync(*SyncRequest, DataBrokerService_SyncServer) error
- func (*UnimplementedDataBrokerServiceServer) SyncLatest(*SyncLatestRequest, DataBrokerService_SyncLatestServer) error
- type Versions
- func (*Versions) Descriptor() ([]byte, []int)deprecated
- func (x *Versions) GetLatestRecordVersion() uint64
- func (x *Versions) GetServerVersion() uint64
- func (*Versions) ProtoMessage()
- func (x *Versions) ProtoReflect() protoreflect.Message
- func (x *Versions) Reset()
- func (x *Versions) String() string
Constants ¶
This section is empty.
Variables ¶
var File_databroker_proto protoreflect.FileDescriptor
Functions ¶
func RegisterDataBrokerServiceServer ¶
func RegisterDataBrokerServiceServer(s *grpc.Server, srv DataBrokerServiceServer)
Types ¶
type AcquireLeaseRequest ¶ added in v0.15.0
type AcquireLeaseRequest struct { // Name is the name of the lease. Only a single client can hold the lease on // the specified name at any one time. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Duration is the duration of the lease. After the duration is reached the // lease can be acquired by other clients. Duration *durationpb.Duration `protobuf:"bytes,2,opt,name=duration,proto3" json:"duration,omitempty"` // contains filtered or unexported fields }
func (*AcquireLeaseRequest) Descriptor
deprecated
added in
v0.15.0
func (*AcquireLeaseRequest) Descriptor() ([]byte, []int)
Deprecated: Use AcquireLeaseRequest.ProtoReflect.Descriptor instead.
func (*AcquireLeaseRequest) GetDuration ¶ added in v0.15.0
func (x *AcquireLeaseRequest) GetDuration() *durationpb.Duration
func (*AcquireLeaseRequest) GetName ¶ added in v0.15.0
func (x *AcquireLeaseRequest) GetName() string
func (*AcquireLeaseRequest) ProtoMessage ¶ added in v0.15.0
func (*AcquireLeaseRequest) ProtoMessage()
func (*AcquireLeaseRequest) ProtoReflect ¶ added in v0.15.0
func (x *AcquireLeaseRequest) ProtoReflect() protoreflect.Message
func (*AcquireLeaseRequest) Reset ¶ added in v0.15.0
func (x *AcquireLeaseRequest) Reset()
func (*AcquireLeaseRequest) String ¶ added in v0.15.0
func (x *AcquireLeaseRequest) String() string
type AcquireLeaseResponse ¶ added in v0.15.0
type AcquireLeaseResponse struct { // Id is the id of the acquired lease. Subsequent calls to release or renew // will need both the lease name and the lease id. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*AcquireLeaseResponse) Descriptor
deprecated
added in
v0.15.0
func (*AcquireLeaseResponse) Descriptor() ([]byte, []int)
Deprecated: Use AcquireLeaseResponse.ProtoReflect.Descriptor instead.
func (*AcquireLeaseResponse) GetId ¶ added in v0.15.0
func (x *AcquireLeaseResponse) GetId() string
func (*AcquireLeaseResponse) ProtoMessage ¶ added in v0.15.0
func (*AcquireLeaseResponse) ProtoMessage()
func (*AcquireLeaseResponse) ProtoReflect ¶ added in v0.15.0
func (x *AcquireLeaseResponse) ProtoReflect() protoreflect.Message
func (*AcquireLeaseResponse) Reset ¶ added in v0.15.0
func (x *AcquireLeaseResponse) Reset()
func (*AcquireLeaseResponse) String ¶ added in v0.15.0
func (x *AcquireLeaseResponse) String() string
type DataBrokerServiceClient ¶
type DataBrokerServiceClient interface { // AcquireLease acquires a distributed mutex lease. AcquireLease(ctx context.Context, in *AcquireLeaseRequest, opts ...grpc.CallOption) (*AcquireLeaseResponse, error) // Get gets a record. Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) // Put saves a record. Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*PutResponse, error) // Query queries for records. Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) // ReleaseLease releases a distributed mutex lease. ReleaseLease(ctx context.Context, in *ReleaseLeaseRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // RenewLease renews a distributed mutex lease. RenewLease(ctx context.Context, in *RenewLeaseRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // SetOptions sets the options for a type in the databroker. SetOptions(ctx context.Context, in *SetOptionsRequest, opts ...grpc.CallOption) (*SetOptionsResponse, error) // Sync streams changes to records after the specified version. Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (DataBrokerService_SyncClient, error) // SyncLatest streams the latest version of every record. SyncLatest(ctx context.Context, in *SyncLatestRequest, opts ...grpc.CallOption) (DataBrokerService_SyncLatestClient, error) }
DataBrokerServiceClient is the client API for DataBrokerService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewDataBrokerServiceClient ¶
func NewDataBrokerServiceClient(cc grpc.ClientConnInterface) DataBrokerServiceClient
type DataBrokerServiceServer ¶
type DataBrokerServiceServer interface { // AcquireLease acquires a distributed mutex lease. AcquireLease(context.Context, *AcquireLeaseRequest) (*AcquireLeaseResponse, error) // Get gets a record. Get(context.Context, *GetRequest) (*GetResponse, error) // Put saves a record. Put(context.Context, *PutRequest) (*PutResponse, error) // Query queries for records. Query(context.Context, *QueryRequest) (*QueryResponse, error) // ReleaseLease releases a distributed mutex lease. ReleaseLease(context.Context, *ReleaseLeaseRequest) (*emptypb.Empty, error) // RenewLease renews a distributed mutex lease. RenewLease(context.Context, *RenewLeaseRequest) (*emptypb.Empty, error) // SetOptions sets the options for a type in the databroker. SetOptions(context.Context, *SetOptionsRequest) (*SetOptionsResponse, error) // Sync streams changes to records after the specified version. Sync(*SyncRequest, DataBrokerService_SyncServer) error // SyncLatest streams the latest version of every record. SyncLatest(*SyncLatestRequest, DataBrokerService_SyncLatestServer) error }
DataBrokerServiceServer is the server API for DataBrokerService service.
type DataBrokerService_SyncClient ¶
type DataBrokerService_SyncClient interface { Recv() (*SyncResponse, error) grpc.ClientStream }
type DataBrokerService_SyncLatestClient ¶ added in v0.14.0
type DataBrokerService_SyncLatestClient interface { Recv() (*SyncLatestResponse, error) grpc.ClientStream }
type DataBrokerService_SyncLatestServer ¶ added in v0.14.0
type DataBrokerService_SyncLatestServer interface { Send(*SyncLatestResponse) error grpc.ServerStream }
type DataBrokerService_SyncServer ¶
type DataBrokerService_SyncServer interface { Send(*SyncResponse) error grpc.ServerStream }
type GetRequest ¶
type GetRequest struct { Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetRequest) Descriptor
deprecated
func (*GetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) GetId ¶
func (x *GetRequest) GetId() string
func (*GetRequest) GetType ¶
func (x *GetRequest) GetType() string
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) ProtoReflect ¶
func (x *GetRequest) ProtoReflect() protoreflect.Message
func (*GetRequest) Reset ¶
func (x *GetRequest) Reset()
func (*GetRequest) String ¶
func (x *GetRequest) String() string
type GetResponse ¶
type GetResponse struct { Record *Record `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` // contains filtered or unexported fields }
func (*GetResponse) Descriptor
deprecated
func (*GetResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.
func (*GetResponse) GetRecord ¶
func (x *GetResponse) GetRecord() *Record
func (*GetResponse) ProtoMessage ¶
func (*GetResponse) ProtoMessage()
func (*GetResponse) ProtoReflect ¶
func (x *GetResponse) ProtoReflect() protoreflect.Message
func (*GetResponse) Reset ¶
func (x *GetResponse) Reset()
func (*GetResponse) String ¶
func (x *GetResponse) String() string
type Leaser ¶ added in v0.15.0
type Leaser struct {
// contains filtered or unexported fields
}
A Leaser attempts to acquire a lease and if successful runs the handler. If the lease is released the context used for the handler will be canceled and a new lease acquisition will be attempted.
type LeaserHandler ¶ added in v0.15.0
type LeaserHandler interface { GetDataBrokerServiceClient() DataBrokerServiceClient RunLeased(ctx context.Context) error }
A LeaserHandler is a handler for the locker.
type Options ¶ added in v0.14.0
type Options struct { // capacity sets a maximum size for the given type. Once the capacity is // reached the oldest records will be removed. Capacity *uint64 `protobuf:"varint,1,opt,name=capacity,proto3,oneof" json:"capacity,omitempty"` // contains filtered or unexported fields }
Options are the options for a type stored in the databroker.
func (*Options) Descriptor
deprecated
added in
v0.14.0
func (*Options) GetCapacity ¶ added in v0.14.0
func (*Options) ProtoMessage ¶ added in v0.14.0
func (*Options) ProtoMessage()
func (*Options) ProtoReflect ¶ added in v0.14.0
func (x *Options) ProtoReflect() protoreflect.Message
type PutRequest ¶ added in v0.14.0
type PutRequest struct { Record *Record `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` // contains filtered or unexported fields }
func (*PutRequest) Descriptor
deprecated
added in
v0.14.0
func (*PutRequest) Descriptor() ([]byte, []int)
Deprecated: Use PutRequest.ProtoReflect.Descriptor instead.
func (*PutRequest) GetRecord ¶ added in v0.14.0
func (x *PutRequest) GetRecord() *Record
func (*PutRequest) ProtoMessage ¶ added in v0.14.0
func (*PutRequest) ProtoMessage()
func (*PutRequest) ProtoReflect ¶ added in v0.14.0
func (x *PutRequest) ProtoReflect() protoreflect.Message
func (*PutRequest) Reset ¶ added in v0.14.0
func (x *PutRequest) Reset()
func (*PutRequest) String ¶ added in v0.14.0
func (x *PutRequest) String() string
type PutResponse ¶ added in v0.14.0
type PutResponse struct { ServerVersion uint64 `protobuf:"varint,1,opt,name=server_version,json=serverVersion,proto3" json:"server_version,omitempty"` Record *Record `protobuf:"bytes,2,opt,name=record,proto3" json:"record,omitempty"` // contains filtered or unexported fields }
func (*PutResponse) Descriptor
deprecated
added in
v0.14.0
func (*PutResponse) Descriptor() ([]byte, []int)
Deprecated: Use PutResponse.ProtoReflect.Descriptor instead.
func (*PutResponse) GetRecord ¶ added in v0.14.0
func (x *PutResponse) GetRecord() *Record
func (*PutResponse) GetServerVersion ¶ added in v0.14.0
func (x *PutResponse) GetServerVersion() uint64
func (*PutResponse) ProtoMessage ¶ added in v0.14.0
func (*PutResponse) ProtoMessage()
func (*PutResponse) ProtoReflect ¶ added in v0.14.0
func (x *PutResponse) ProtoReflect() protoreflect.Message
func (*PutResponse) Reset ¶ added in v0.14.0
func (x *PutResponse) Reset()
func (*PutResponse) String ¶ added in v0.14.0
func (x *PutResponse) String() string
type QueryRequest ¶ added in v0.11.0
type QueryRequest struct { Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` Query string `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"` Offset int64 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"` Limit int64 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` // contains filtered or unexported fields }
func (*QueryRequest) Descriptor
deprecated
added in
v0.11.0
func (*QueryRequest) Descriptor() ([]byte, []int)
Deprecated: Use QueryRequest.ProtoReflect.Descriptor instead.
func (*QueryRequest) GetLimit ¶ added in v0.11.0
func (x *QueryRequest) GetLimit() int64
func (*QueryRequest) GetOffset ¶ added in v0.11.0
func (x *QueryRequest) GetOffset() int64
func (*QueryRequest) GetQuery ¶ added in v0.11.0
func (x *QueryRequest) GetQuery() string
func (*QueryRequest) GetType ¶ added in v0.11.0
func (x *QueryRequest) GetType() string
func (*QueryRequest) ProtoMessage ¶ added in v0.11.0
func (*QueryRequest) ProtoMessage()
func (*QueryRequest) ProtoReflect ¶ added in v0.11.0
func (x *QueryRequest) ProtoReflect() protoreflect.Message
func (*QueryRequest) Reset ¶ added in v0.11.0
func (x *QueryRequest) Reset()
func (*QueryRequest) String ¶ added in v0.11.0
func (x *QueryRequest) String() string
type QueryResponse ¶ added in v0.11.0
type QueryResponse struct { Records []*Record `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"` TotalCount int64 `protobuf:"varint,2,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` // contains filtered or unexported fields }
func (*QueryResponse) Descriptor
deprecated
added in
v0.11.0
func (*QueryResponse) Descriptor() ([]byte, []int)
Deprecated: Use QueryResponse.ProtoReflect.Descriptor instead.
func (*QueryResponse) GetRecords ¶ added in v0.11.0
func (x *QueryResponse) GetRecords() []*Record
func (*QueryResponse) GetTotalCount ¶ added in v0.11.0
func (x *QueryResponse) GetTotalCount() int64
func (*QueryResponse) ProtoMessage ¶ added in v0.11.0
func (*QueryResponse) ProtoMessage()
func (*QueryResponse) ProtoReflect ¶ added in v0.11.0
func (x *QueryResponse) ProtoReflect() protoreflect.Message
func (*QueryResponse) Reset ¶ added in v0.11.0
func (x *QueryResponse) Reset()
func (*QueryResponse) String ¶ added in v0.11.0
func (x *QueryResponse) String() string
type Record ¶
type Record struct { Version uint64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` Data *anypb.Any `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` ModifiedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=modified_at,json=modifiedAt,proto3" json:"modified_at,omitempty"` DeletedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"` // contains filtered or unexported fields }
func ApplyOffsetAndLimit ¶ added in v0.11.0
ApplyOffsetAndLimit applies the offset and limit to the list of records.
func InitialSync ¶ added in v0.11.0
func InitialSync( ctx context.Context, client DataBrokerServiceClient, req *SyncLatestRequest, ) (records []*Record, recordVersion, serverVersion uint64, err error)
InitialSync performs a sync latest and then returns all the results.
func (*Record) Descriptor
deprecated
func (*Record) GetDeletedAt ¶
func (x *Record) GetDeletedAt() *timestamppb.Timestamp
func (*Record) GetModifiedAt ¶
func (x *Record) GetModifiedAt() *timestamppb.Timestamp
func (*Record) GetVersion ¶
func (*Record) ProtoMessage ¶
func (*Record) ProtoMessage()
func (*Record) ProtoReflect ¶
func (x *Record) ProtoReflect() protoreflect.Message
type ReleaseLeaseRequest ¶ added in v0.15.0
type ReleaseLeaseRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*ReleaseLeaseRequest) Descriptor
deprecated
added in
v0.15.0
func (*ReleaseLeaseRequest) Descriptor() ([]byte, []int)
Deprecated: Use ReleaseLeaseRequest.ProtoReflect.Descriptor instead.
func (*ReleaseLeaseRequest) GetId ¶ added in v0.15.0
func (x *ReleaseLeaseRequest) GetId() string
func (*ReleaseLeaseRequest) GetName ¶ added in v0.15.0
func (x *ReleaseLeaseRequest) GetName() string
func (*ReleaseLeaseRequest) ProtoMessage ¶ added in v0.15.0
func (*ReleaseLeaseRequest) ProtoMessage()
func (*ReleaseLeaseRequest) ProtoReflect ¶ added in v0.15.0
func (x *ReleaseLeaseRequest) ProtoReflect() protoreflect.Message
func (*ReleaseLeaseRequest) Reset ¶ added in v0.15.0
func (x *ReleaseLeaseRequest) Reset()
func (*ReleaseLeaseRequest) String ¶ added in v0.15.0
func (x *ReleaseLeaseRequest) String() string
type RenewLeaseRequest ¶ added in v0.15.0
type RenewLeaseRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` Duration *durationpb.Duration `protobuf:"bytes,3,opt,name=duration,proto3" json:"duration,omitempty"` // contains filtered or unexported fields }
func (*RenewLeaseRequest) Descriptor
deprecated
added in
v0.15.0
func (*RenewLeaseRequest) Descriptor() ([]byte, []int)
Deprecated: Use RenewLeaseRequest.ProtoReflect.Descriptor instead.
func (*RenewLeaseRequest) GetDuration ¶ added in v0.15.0
func (x *RenewLeaseRequest) GetDuration() *durationpb.Duration
func (*RenewLeaseRequest) GetId ¶ added in v0.15.0
func (x *RenewLeaseRequest) GetId() string
func (*RenewLeaseRequest) GetName ¶ added in v0.15.0
func (x *RenewLeaseRequest) GetName() string
func (*RenewLeaseRequest) ProtoMessage ¶ added in v0.15.0
func (*RenewLeaseRequest) ProtoMessage()
func (*RenewLeaseRequest) ProtoReflect ¶ added in v0.15.0
func (x *RenewLeaseRequest) ProtoReflect() protoreflect.Message
func (*RenewLeaseRequest) Reset ¶ added in v0.15.0
func (x *RenewLeaseRequest) Reset()
func (*RenewLeaseRequest) String ¶ added in v0.15.0
func (x *RenewLeaseRequest) String() string
type SetOptionsRequest ¶ added in v0.14.0
type SetOptionsRequest struct { Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` Options *Options `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` // contains filtered or unexported fields }
func (*SetOptionsRequest) Descriptor
deprecated
added in
v0.14.0
func (*SetOptionsRequest) Descriptor() ([]byte, []int)
Deprecated: Use SetOptionsRequest.ProtoReflect.Descriptor instead.
func (*SetOptionsRequest) GetOptions ¶ added in v0.14.0
func (x *SetOptionsRequest) GetOptions() *Options
func (*SetOptionsRequest) GetType ¶ added in v0.14.0
func (x *SetOptionsRequest) GetType() string
func (*SetOptionsRequest) ProtoMessage ¶ added in v0.14.0
func (*SetOptionsRequest) ProtoMessage()
func (*SetOptionsRequest) ProtoReflect ¶ added in v0.14.0
func (x *SetOptionsRequest) ProtoReflect() protoreflect.Message
func (*SetOptionsRequest) Reset ¶ added in v0.14.0
func (x *SetOptionsRequest) Reset()
func (*SetOptionsRequest) String ¶ added in v0.14.0
func (x *SetOptionsRequest) String() string
type SetOptionsResponse ¶ added in v0.14.0
type SetOptionsResponse struct { Options *Options `protobuf:"bytes,1,opt,name=options,proto3" json:"options,omitempty"` // contains filtered or unexported fields }
func (*SetOptionsResponse) Descriptor
deprecated
added in
v0.14.0
func (*SetOptionsResponse) Descriptor() ([]byte, []int)
Deprecated: Use SetOptionsResponse.ProtoReflect.Descriptor instead.
func (*SetOptionsResponse) GetOptions ¶ added in v0.14.0
func (x *SetOptionsResponse) GetOptions() *Options
func (*SetOptionsResponse) ProtoMessage ¶ added in v0.14.0
func (*SetOptionsResponse) ProtoMessage()
func (*SetOptionsResponse) ProtoReflect ¶ added in v0.14.0
func (x *SetOptionsResponse) ProtoReflect() protoreflect.Message
func (*SetOptionsResponse) Reset ¶ added in v0.14.0
func (x *SetOptionsResponse) Reset()
func (*SetOptionsResponse) String ¶ added in v0.14.0
func (x *SetOptionsResponse) String() string
type SyncLatestRequest ¶ added in v0.14.0
type SyncLatestRequest struct { Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // contains filtered or unexported fields }
func (*SyncLatestRequest) Descriptor
deprecated
added in
v0.14.0
func (*SyncLatestRequest) Descriptor() ([]byte, []int)
Deprecated: Use SyncLatestRequest.ProtoReflect.Descriptor instead.
func (*SyncLatestRequest) GetType ¶ added in v0.14.0
func (x *SyncLatestRequest) GetType() string
func (*SyncLatestRequest) ProtoMessage ¶ added in v0.14.0
func (*SyncLatestRequest) ProtoMessage()
func (*SyncLatestRequest) ProtoReflect ¶ added in v0.14.0
func (x *SyncLatestRequest) ProtoReflect() protoreflect.Message
func (*SyncLatestRequest) Reset ¶ added in v0.14.0
func (x *SyncLatestRequest) Reset()
func (*SyncLatestRequest) String ¶ added in v0.14.0
func (x *SyncLatestRequest) String() string
type SyncLatestResponse ¶ added in v0.14.0
type SyncLatestResponse struct { // Types that are assignable to Response: // *SyncLatestResponse_Record // *SyncLatestResponse_Versions Response isSyncLatestResponse_Response `protobuf_oneof:"response"` // contains filtered or unexported fields }
func (*SyncLatestResponse) Descriptor
deprecated
added in
v0.14.0
func (*SyncLatestResponse) Descriptor() ([]byte, []int)
Deprecated: Use SyncLatestResponse.ProtoReflect.Descriptor instead.
func (*SyncLatestResponse) GetRecord ¶ added in v0.14.0
func (x *SyncLatestResponse) GetRecord() *Record
func (*SyncLatestResponse) GetResponse ¶ added in v0.14.0
func (m *SyncLatestResponse) GetResponse() isSyncLatestResponse_Response
func (*SyncLatestResponse) GetVersions ¶ added in v0.14.0
func (x *SyncLatestResponse) GetVersions() *Versions
func (*SyncLatestResponse) ProtoMessage ¶ added in v0.14.0
func (*SyncLatestResponse) ProtoMessage()
func (*SyncLatestResponse) ProtoReflect ¶ added in v0.14.0
func (x *SyncLatestResponse) ProtoReflect() protoreflect.Message
func (*SyncLatestResponse) Reset ¶ added in v0.14.0
func (x *SyncLatestResponse) Reset()
func (*SyncLatestResponse) String ¶ added in v0.14.0
func (x *SyncLatestResponse) String() string
type SyncLatestResponse_Record ¶ added in v0.14.0
type SyncLatestResponse_Record struct {
Record *Record `protobuf:"bytes,1,opt,name=record,proto3,oneof"`
}
type SyncLatestResponse_Versions ¶ added in v0.14.0
type SyncLatestResponse_Versions struct {
Versions *Versions `protobuf:"bytes,2,opt,name=versions,proto3,oneof"`
}
type SyncRequest ¶
type SyncRequest struct { ServerVersion uint64 `protobuf:"varint,1,opt,name=server_version,json=serverVersion,proto3" json:"server_version,omitempty"` RecordVersion uint64 `protobuf:"varint,2,opt,name=record_version,json=recordVersion,proto3" json:"record_version,omitempty"` // contains filtered or unexported fields }
func (*SyncRequest) Descriptor
deprecated
func (*SyncRequest) Descriptor() ([]byte, []int)
Deprecated: Use SyncRequest.ProtoReflect.Descriptor instead.
func (*SyncRequest) GetRecordVersion ¶
func (x *SyncRequest) GetRecordVersion() uint64
func (*SyncRequest) GetServerVersion ¶
func (x *SyncRequest) GetServerVersion() uint64
func (*SyncRequest) ProtoMessage ¶
func (*SyncRequest) ProtoMessage()
func (*SyncRequest) ProtoReflect ¶
func (x *SyncRequest) ProtoReflect() protoreflect.Message
func (*SyncRequest) Reset ¶
func (x *SyncRequest) Reset()
func (*SyncRequest) String ¶
func (x *SyncRequest) String() string
type SyncResponse ¶
type SyncResponse struct { Record *Record `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` // contains filtered or unexported fields }
func (*SyncResponse) Descriptor
deprecated
func (*SyncResponse) Descriptor() ([]byte, []int)
Deprecated: Use SyncResponse.ProtoReflect.Descriptor instead.
func (*SyncResponse) GetRecord ¶ added in v0.14.0
func (x *SyncResponse) GetRecord() *Record
func (*SyncResponse) ProtoMessage ¶
func (*SyncResponse) ProtoMessage()
func (*SyncResponse) ProtoReflect ¶
func (x *SyncResponse) ProtoReflect() protoreflect.Message
func (*SyncResponse) Reset ¶
func (x *SyncResponse) Reset()
func (*SyncResponse) String ¶
func (x *SyncResponse) String() string
type Syncer ¶ added in v0.14.0
type Syncer struct {
// contains filtered or unexported fields
}
A Syncer is a helper type for working with Sync and SyncLatest. It will make a call to SyncLatest to retrieve the latest version of the data, then begin syncing with a call to Sync. If the server version changes `ClearRecords` will be called and the process will start over.
func NewSyncer ¶ added in v0.14.0
func NewSyncer(id string, handler SyncerHandler, options ...SyncerOption) *Syncer
NewSyncer creates a new Syncer.
type SyncerHandler ¶ added in v0.14.0
type SyncerHandler interface { GetDataBrokerServiceClient() DataBrokerServiceClient ClearRecords(ctx context.Context) UpdateRecords(ctx context.Context, serverVersion uint64, records []*Record) }
A SyncerHandler receives sync events from the Syncer.
type SyncerOption ¶ added in v0.14.0
type SyncerOption func(cfg *syncerConfig)
A SyncerOption customizes the syncer configuration.
func WithFastForward ¶ added in v0.15.5
func WithFastForward() SyncerOption
WithFastForward in case updates are coming faster then Update can process them, will skip older records to maintain an update rate. Use for entries that represent a full state snapshot i.e. Config
func WithTypeURL ¶ added in v0.14.0
func WithTypeURL(typeURL string) SyncerOption
WithTypeURL restricts the sync'd results to the given type.
type UnimplementedDataBrokerServiceServer ¶
type UnimplementedDataBrokerServiceServer struct { }
UnimplementedDataBrokerServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedDataBrokerServiceServer) AcquireLease ¶ added in v0.15.0
func (*UnimplementedDataBrokerServiceServer) AcquireLease(context.Context, *AcquireLeaseRequest) (*AcquireLeaseResponse, error)
func (*UnimplementedDataBrokerServiceServer) Get ¶
func (*UnimplementedDataBrokerServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error)
func (*UnimplementedDataBrokerServiceServer) Put ¶ added in v0.14.0
func (*UnimplementedDataBrokerServiceServer) Put(context.Context, *PutRequest) (*PutResponse, error)
func (*UnimplementedDataBrokerServiceServer) Query ¶ added in v0.11.0
func (*UnimplementedDataBrokerServiceServer) Query(context.Context, *QueryRequest) (*QueryResponse, error)
func (*UnimplementedDataBrokerServiceServer) ReleaseLease ¶ added in v0.15.0
func (*UnimplementedDataBrokerServiceServer) ReleaseLease(context.Context, *ReleaseLeaseRequest) (*emptypb.Empty, error)
func (*UnimplementedDataBrokerServiceServer) RenewLease ¶ added in v0.15.0
func (*UnimplementedDataBrokerServiceServer) RenewLease(context.Context, *RenewLeaseRequest) (*emptypb.Empty, error)
func (*UnimplementedDataBrokerServiceServer) SetOptions ¶ added in v0.14.0
func (*UnimplementedDataBrokerServiceServer) SetOptions(context.Context, *SetOptionsRequest) (*SetOptionsResponse, error)
func (*UnimplementedDataBrokerServiceServer) SyncLatest ¶ added in v0.14.0
func (*UnimplementedDataBrokerServiceServer) SyncLatest(*SyncLatestRequest, DataBrokerService_SyncLatestServer) error
type Versions ¶ added in v0.14.0
type Versions struct { // the server version indicates the version of the server storing the data ServerVersion uint64 `protobuf:"varint,1,opt,name=server_version,json=serverVersion,proto3" json:"server_version,omitempty"` LatestRecordVersion uint64 `protobuf:"varint,2,opt,name=latest_record_version,json=latestRecordVersion,proto3" json:"latest_record_version,omitempty"` // contains filtered or unexported fields }
func (*Versions) Descriptor
deprecated
added in
v0.14.0
func (*Versions) GetLatestRecordVersion ¶ added in v0.14.0
func (*Versions) GetServerVersion ¶ added in v0.14.0
func (*Versions) ProtoMessage ¶ added in v0.14.0
func (*Versions) ProtoMessage()
func (*Versions) ProtoReflect ¶ added in v0.14.0
func (x *Versions) ProtoReflect() protoreflect.Message
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package mock_databroker is a generated GoMock package.
|
Package mock_databroker is a generated GoMock package. |