Documentation
¶
Overview ¶
Package protocol defines the consumer datamodel, validation behaviors, and gRPC APIs which are shared across clients and consumer application servers. Datamodel types and APIs are implemented as generated protobuf messages and stubs, typically extended with additional parsing, validation, and shared implementation behaviors. A central goal of this package to be highly exacting in defining allowed "shapes" that types & messages may take (through implementations of the Validator interface), providing strong guarantees to consumers and clients that messages are well-formed without need for additional ad-hoc, repetitive checks (which often become a maintenance burden).
By convention, this package is usually imported as `pc`, short for "Protocol of Consumer", due to it's ubiquity and to distinguish it from package go.gazette.dev/core/broker/protocol (imported as `pb`). Eg,
import pc "go.gazette.dev/core/consumer/protocol"
Package protocol is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func FlattenProducerStates(cp Checkpoint) []message.ProducerState
- func FlattenReadThrough(cp Checkpoint) pb.Offsets
- func RegisterShardHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterShardHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ShardClient) error
- func RegisterShardHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterShardHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ShardServer) error
- func RegisterShardServer(s *grpc.Server, srv ShardServer)
- type ApplyRequest
- func (*ApplyRequest) Descriptor() ([]byte, []int)
- func (m *ApplyRequest) Marshal() (dAtA []byte, err error)
- func (m *ApplyRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *ApplyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ApplyRequest) ProtoMessage()
- func (m *ApplyRequest) ProtoSize() (n int)
- func (m *ApplyRequest) Reset()
- func (m *ApplyRequest) String() string
- func (m *ApplyRequest) Unmarshal(dAtA []byte) error
- func (m *ApplyRequest) Validate() error
- func (m *ApplyRequest) XXX_DiscardUnknown()
- func (m *ApplyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ApplyRequest) XXX_Merge(src proto.Message)
- func (m *ApplyRequest) XXX_Size() int
- func (m *ApplyRequest) XXX_Unmarshal(b []byte) error
- type ApplyRequest_Change
- func (*ApplyRequest_Change) Descriptor() ([]byte, []int)
- func (m *ApplyRequest_Change) Marshal() (dAtA []byte, err error)
- func (m *ApplyRequest_Change) MarshalTo(dAtA []byte) (int, error)
- func (m *ApplyRequest_Change) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ApplyRequest_Change) ProtoMessage()
- func (m *ApplyRequest_Change) ProtoSize() (n int)
- func (m *ApplyRequest_Change) Reset()
- func (m *ApplyRequest_Change) String() string
- func (m *ApplyRequest_Change) Unmarshal(dAtA []byte) error
- func (m *ApplyRequest_Change) Validate() error
- func (m *ApplyRequest_Change) XXX_DiscardUnknown()
- func (m *ApplyRequest_Change) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ApplyRequest_Change) XXX_Merge(src proto.Message)
- func (m *ApplyRequest_Change) XXX_Size() int
- func (m *ApplyRequest_Change) XXX_Unmarshal(b []byte) error
- type ApplyResponse
- func (*ApplyResponse) Descriptor() ([]byte, []int)
- func (m *ApplyResponse) Marshal() (dAtA []byte, err error)
- func (m *ApplyResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *ApplyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ApplyResponse) ProtoMessage()
- func (m *ApplyResponse) ProtoSize() (n int)
- func (m *ApplyResponse) Reset()
- func (m *ApplyResponse) String() string
- func (m *ApplyResponse) Unmarshal(dAtA []byte) error
- func (m *ApplyResponse) Validate() error
- func (m *ApplyResponse) XXX_DiscardUnknown()
- func (m *ApplyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ApplyResponse) XXX_Merge(src proto.Message)
- func (m *ApplyResponse) XXX_Size() int
- func (m *ApplyResponse) XXX_Unmarshal(b []byte) error
- type AuthShardClient
- func (a *AuthShardClient) Apply(ctx context.Context, in *ApplyRequest, opts ...grpc.CallOption) (*ApplyResponse, error)
- func (a *AuthShardClient) GetHints(ctx context.Context, in *GetHintsRequest, opts ...grpc.CallOption) (*GetHintsResponse, error)
- func (a *AuthShardClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
- func (a *AuthShardClient) Stat(ctx context.Context, in *StatRequest, opts ...grpc.CallOption) (*StatResponse, error)
- func (a *AuthShardClient) Unassign(ctx context.Context, in *UnassignRequest, opts ...grpc.CallOption) (*UnassignResponse, error)
- type AuthShardServer
- type BuildCheckpointArgs
- type Checkpoint
- func (*Checkpoint) Descriptor() ([]byte, []int)
- func (m *Checkpoint) Marshal() (dAtA []byte, err error)
- func (m *Checkpoint) MarshalTo(dAtA []byte) (int, error)
- func (m *Checkpoint) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Checkpoint) ProtoMessage()
- func (m *Checkpoint) ProtoSize() (n int)
- func (m *Checkpoint) Reset()
- func (m *Checkpoint) String() string
- func (m *Checkpoint) Unmarshal(dAtA []byte) error
- func (m *Checkpoint) XXX_DiscardUnknown()
- func (m *Checkpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Checkpoint) XXX_Merge(src proto.Message)
- func (m *Checkpoint) XXX_Size() int
- func (m *Checkpoint) XXX_Unmarshal(b []byte) error
- type Checkpoint_ProducerState
- func (*Checkpoint_ProducerState) Descriptor() ([]byte, []int)
- func (m *Checkpoint_ProducerState) Marshal() (dAtA []byte, err error)
- func (m *Checkpoint_ProducerState) MarshalTo(dAtA []byte) (int, error)
- func (m *Checkpoint_ProducerState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Checkpoint_ProducerState) ProtoMessage()
- func (m *Checkpoint_ProducerState) ProtoSize() (n int)
- func (m *Checkpoint_ProducerState) Reset()
- func (m *Checkpoint_ProducerState) String() string
- func (m *Checkpoint_ProducerState) Unmarshal(dAtA []byte) error
- func (m *Checkpoint_ProducerState) XXX_DiscardUnknown()
- func (m *Checkpoint_ProducerState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Checkpoint_ProducerState) XXX_Merge(src proto.Message)
- func (m *Checkpoint_ProducerState) XXX_Size() int
- func (m *Checkpoint_ProducerState) XXX_Unmarshal(b []byte) error
- type Checkpoint_Source
- func (*Checkpoint_Source) Descriptor() ([]byte, []int)
- func (m *Checkpoint_Source) Marshal() (dAtA []byte, err error)
- func (m *Checkpoint_Source) MarshalTo(dAtA []byte) (int, error)
- func (m *Checkpoint_Source) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Checkpoint_Source) ProtoMessage()
- func (m *Checkpoint_Source) ProtoSize() (n int)
- func (m *Checkpoint_Source) Reset()
- func (m *Checkpoint_Source) String() string
- func (m *Checkpoint_Source) Unmarshal(dAtA []byte) error
- func (m *Checkpoint_Source) XXX_DiscardUnknown()
- func (m *Checkpoint_Source) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Checkpoint_Source) XXX_Merge(src proto.Message)
- func (m *Checkpoint_Source) XXX_Size() int
- func (m *Checkpoint_Source) XXX_Unmarshal(b []byte) error
- type Checkpoint_Source_ProducerEntry
- func (*Checkpoint_Source_ProducerEntry) Descriptor() ([]byte, []int)
- func (m *Checkpoint_Source_ProducerEntry) Marshal() (dAtA []byte, err error)
- func (m *Checkpoint_Source_ProducerEntry) MarshalTo(dAtA []byte) (int, error)
- func (m *Checkpoint_Source_ProducerEntry) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Checkpoint_Source_ProducerEntry) ProtoMessage()
- func (m *Checkpoint_Source_ProducerEntry) ProtoSize() (n int)
- func (m *Checkpoint_Source_ProducerEntry) Reset()
- func (m *Checkpoint_Source_ProducerEntry) String() string
- func (m *Checkpoint_Source_ProducerEntry) Unmarshal(dAtA []byte) error
- func (m *Checkpoint_Source_ProducerEntry) XXX_DiscardUnknown()
- func (m *Checkpoint_Source_ProducerEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Checkpoint_Source_ProducerEntry) XXX_Merge(src proto.Message)
- func (m *Checkpoint_Source_ProducerEntry) XXX_Size() int
- func (m *Checkpoint_Source_ProducerEntry) XXX_Unmarshal(b []byte) error
- type ConsumerSpec
- func (*ConsumerSpec) Descriptor() ([]byte, []int)
- func (m *ConsumerSpec) ItemLimit() int
- func (m *ConsumerSpec) Marshal() (dAtA []byte, err error)
- func (m *ConsumerSpec) MarshalString() string
- func (m *ConsumerSpec) MarshalTo(dAtA []byte) (int, error)
- func (m *ConsumerSpec) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ConsumerSpec) ProtoMessage()
- func (m *ConsumerSpec) ProtoSize() (n int)
- func (m *ConsumerSpec) Reset()
- func (m *ConsumerSpec) String() string
- func (m *ConsumerSpec) Unmarshal(dAtA []byte) error
- func (m *ConsumerSpec) Validate() error
- func (m *ConsumerSpec) XXX_DiscardUnknown()
- func (m *ConsumerSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ConsumerSpec) XXX_Merge(src proto.Message)
- func (m *ConsumerSpec) XXX_Size() int
- func (m *ConsumerSpec) XXX_Unmarshal(b []byte) error
- func (m *ConsumerSpec) ZeroLimit()
- type GetHintsRequest
- func (*GetHintsRequest) Descriptor() ([]byte, []int)
- func (m *GetHintsRequest) Marshal() (dAtA []byte, err error)
- func (m *GetHintsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *GetHintsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GetHintsRequest) ProtoMessage()
- func (m *GetHintsRequest) ProtoSize() (n int)
- func (m *GetHintsRequest) Reset()
- func (m *GetHintsRequest) String() string
- func (m *GetHintsRequest) Unmarshal(dAtA []byte) error
- func (m *GetHintsRequest) Validate() error
- func (m *GetHintsRequest) XXX_DiscardUnknown()
- func (m *GetHintsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetHintsRequest) XXX_Merge(src proto.Message)
- func (m *GetHintsRequest) XXX_Size() int
- func (m *GetHintsRequest) XXX_Unmarshal(b []byte) error
- type GetHintsResponse
- func (*GetHintsResponse) Descriptor() ([]byte, []int)
- func (m *GetHintsResponse) Marshal() (dAtA []byte, err error)
- func (m *GetHintsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *GetHintsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GetHintsResponse) ProtoMessage()
- func (m *GetHintsResponse) ProtoSize() (n int)
- func (m *GetHintsResponse) Reset()
- func (m *GetHintsResponse) String() string
- func (m *GetHintsResponse) Unmarshal(dAtA []byte) error
- func (m *GetHintsResponse) Validate() error
- func (m *GetHintsResponse) XXX_DiscardUnknown()
- func (m *GetHintsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetHintsResponse) XXX_Merge(src proto.Message)
- func (m *GetHintsResponse) XXX_Size() int
- func (m *GetHintsResponse) XXX_Unmarshal(b []byte) error
- type GetHintsResponse_ResponseHints
- func (*GetHintsResponse_ResponseHints) Descriptor() ([]byte, []int)
- func (m *GetHintsResponse_ResponseHints) Marshal() (dAtA []byte, err error)
- func (m *GetHintsResponse_ResponseHints) MarshalTo(dAtA []byte) (int, error)
- func (m *GetHintsResponse_ResponseHints) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GetHintsResponse_ResponseHints) ProtoMessage()
- func (m *GetHintsResponse_ResponseHints) ProtoSize() (n int)
- func (m *GetHintsResponse_ResponseHints) Reset()
- func (m *GetHintsResponse_ResponseHints) String() string
- func (m *GetHintsResponse_ResponseHints) Unmarshal(dAtA []byte) error
- func (m GetHintsResponse_ResponseHints) Validate() error
- func (m *GetHintsResponse_ResponseHints) XXX_DiscardUnknown()
- func (m *GetHintsResponse_ResponseHints) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetHintsResponse_ResponseHints) XXX_Merge(src proto.Message)
- func (m *GetHintsResponse_ResponseHints) XXX_Size() int
- func (m *GetHintsResponse_ResponseHints) XXX_Unmarshal(b []byte) error
- type ListRequest
- func (*ListRequest) Descriptor() ([]byte, []int)
- func (m *ListRequest) Marshal() (dAtA []byte, err error)
- func (m *ListRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *ListRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ListRequest) ProtoMessage()
- func (m *ListRequest) ProtoSize() (n int)
- func (m *ListRequest) Reset()
- func (m *ListRequest) String() string
- func (m *ListRequest) Unmarshal(dAtA []byte) error
- func (m *ListRequest) Validate() error
- func (m *ListRequest) XXX_DiscardUnknown()
- func (m *ListRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListRequest) XXX_Merge(src proto.Message)
- func (m *ListRequest) XXX_Size() int
- func (m *ListRequest) XXX_Unmarshal(b []byte) error
- type ListResponse
- func (*ListResponse) Descriptor() ([]byte, []int)
- func (m *ListResponse) Marshal() (dAtA []byte, err error)
- func (m *ListResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *ListResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ListResponse) ProtoMessage()
- func (m *ListResponse) ProtoSize() (n int)
- func (m *ListResponse) Reset()
- func (m *ListResponse) String() string
- func (m *ListResponse) Unmarshal(dAtA []byte) error
- func (m *ListResponse) Validate() error
- func (m *ListResponse) XXX_DiscardUnknown()
- func (m *ListResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListResponse) XXX_Merge(src proto.Message)
- func (m *ListResponse) XXX_Size() int
- func (m *ListResponse) XXX_Unmarshal(b []byte) error
- type ListResponse_Shard
- func (*ListResponse_Shard) Descriptor() ([]byte, []int)
- func (m *ListResponse_Shard) Marshal() (dAtA []byte, err error)
- func (m *ListResponse_Shard) MarshalTo(dAtA []byte) (int, error)
- func (m *ListResponse_Shard) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ListResponse_Shard) ProtoMessage()
- func (m *ListResponse_Shard) ProtoSize() (n int)
- func (m *ListResponse_Shard) Reset()
- func (m *ListResponse_Shard) String() string
- func (m *ListResponse_Shard) Unmarshal(dAtA []byte) error
- func (m *ListResponse_Shard) Validate() error
- func (m *ListResponse_Shard) XXX_DiscardUnknown()
- func (m *ListResponse_Shard) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListResponse_Shard) XXX_Merge(src proto.Message)
- func (m *ListResponse_Shard) XXX_Size() int
- func (m *ListResponse_Shard) XXX_Unmarshal(b []byte) error
- type ReplicaStatus
- func (*ReplicaStatus) Descriptor() ([]byte, []int)
- func (m *ReplicaStatus) Marshal() (dAtA []byte, err error)
- func (m *ReplicaStatus) MarshalString() string
- func (m *ReplicaStatus) MarshalTo(dAtA []byte) (int, error)
- func (m *ReplicaStatus) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ReplicaStatus) ProtoMessage()
- func (m *ReplicaStatus) ProtoSize() (n int)
- func (m *ReplicaStatus) Reduce(other *ReplicaStatus)
- func (m *ReplicaStatus) Reset()
- func (m *ReplicaStatus) String() string
- func (m *ReplicaStatus) Unmarshal(dAtA []byte) error
- func (m *ReplicaStatus) Validate() error
- func (m *ReplicaStatus) XXX_DiscardUnknown()
- func (m *ReplicaStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ReplicaStatus) XXX_Merge(src proto.Message)
- func (m *ReplicaStatus) XXX_Size() int
- func (m *ReplicaStatus) XXX_Unmarshal(b []byte) error
- type ReplicaStatus_Code
- type RoutedShardClient
- type ShardClient
- type ShardID
- type ShardServer
- type ShardSpec
- func (*ShardSpec) Descriptor() ([]byte, []int)
- func (m *ShardSpec) DesiredReplication() int
- func (this *ShardSpec) Equal(that interface{}) bool
- func (m *ShardSpec) HintBackupKeys() []string
- func (m *ShardSpec) HintPrimaryKey() string
- func (m *ShardSpec) LabelSetExt(buf pb.LabelSet) pb.LabelSet
- func (m *ShardSpec) Marshal() (dAtA []byte, err error)
- func (m *ShardSpec) MarshalString() string
- func (m *ShardSpec) MarshalTo(dAtA []byte) (int, error)
- func (m *ShardSpec) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ShardSpec) ProtoMessage()
- func (m *ShardSpec) ProtoSize() (n int)
- func (m *ShardSpec) RecoveryLog() pb.Journal
- func (m *ShardSpec) Reset()
- func (m *ShardSpec) String() string
- func (m *ShardSpec) Unmarshal(dAtA []byte) error
- func (m *ShardSpec) Validate() error
- func (m *ShardSpec) XXX_DiscardUnknown()
- func (m *ShardSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ShardSpec) XXX_Merge(src proto.Message)
- func (m *ShardSpec) XXX_Size() int
- func (m *ShardSpec) XXX_Unmarshal(b []byte) error
- type ShardSpec_Source
- func (*ShardSpec_Source) Descriptor() ([]byte, []int)
- func (this *ShardSpec_Source) Equal(that interface{}) bool
- func (m *ShardSpec_Source) Marshal() (dAtA []byte, err error)
- func (m *ShardSpec_Source) MarshalTo(dAtA []byte) (int, error)
- func (m *ShardSpec_Source) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ShardSpec_Source) ProtoMessage()
- func (m *ShardSpec_Source) ProtoSize() (n int)
- func (m *ShardSpec_Source) Reset()
- func (m *ShardSpec_Source) String() string
- func (m *ShardSpec_Source) Unmarshal(dAtA []byte) error
- func (m *ShardSpec_Source) Validate() error
- func (m *ShardSpec_Source) XXX_DiscardUnknown()
- func (m *ShardSpec_Source) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ShardSpec_Source) XXX_Merge(src proto.Message)
- func (m *ShardSpec_Source) XXX_Size() int
- func (m *ShardSpec_Source) XXX_Unmarshal(b []byte) error
- type StatRequest
- func (*StatRequest) Descriptor() ([]byte, []int)
- func (m *StatRequest) Marshal() (dAtA []byte, err error)
- func (m *StatRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *StatRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*StatRequest) ProtoMessage()
- func (m *StatRequest) ProtoSize() (n int)
- func (m *StatRequest) Reset()
- func (m *StatRequest) String() string
- func (m *StatRequest) Unmarshal(dAtA []byte) error
- func (m *StatRequest) Validate() error
- func (m *StatRequest) XXX_DiscardUnknown()
- func (m *StatRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StatRequest) XXX_Merge(src proto.Message)
- func (m *StatRequest) XXX_Size() int
- func (m *StatRequest) XXX_Unmarshal(b []byte) error
- type StatResponse
- func (*StatResponse) Descriptor() ([]byte, []int)
- func (m *StatResponse) Marshal() (dAtA []byte, err error)
- func (m *StatResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *StatResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*StatResponse) ProtoMessage()
- func (m *StatResponse) ProtoSize() (n int)
- func (m *StatResponse) Reset()
- func (m *StatResponse) String() string
- func (m *StatResponse) Unmarshal(dAtA []byte) error
- func (m *StatResponse) Validate() error
- func (m *StatResponse) XXX_DiscardUnknown()
- func (m *StatResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StatResponse) XXX_Merge(src proto.Message)
- func (m *StatResponse) XXX_Size() int
- func (m *StatResponse) XXX_Unmarshal(b []byte) error
- type Status
- type UnassignRequest
- func (*UnassignRequest) Descriptor() ([]byte, []int)
- func (m *UnassignRequest) Marshal() (dAtA []byte, err error)
- func (m *UnassignRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *UnassignRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*UnassignRequest) ProtoMessage()
- func (m *UnassignRequest) ProtoSize() (n int)
- func (m *UnassignRequest) Reset()
- func (m *UnassignRequest) String() string
- func (m *UnassignRequest) Unmarshal(dAtA []byte) error
- func (m *UnassignRequest) Validate() error
- func (m *UnassignRequest) XXX_DiscardUnknown()
- func (m *UnassignRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UnassignRequest) XXX_Merge(src proto.Message)
- func (m *UnassignRequest) XXX_Size() int
- func (m *UnassignRequest) XXX_Unmarshal(b []byte) error
- type UnassignResponse
- func (*UnassignResponse) Descriptor() ([]byte, []int)
- func (m *UnassignResponse) Marshal() (dAtA []byte, err error)
- func (m *UnassignResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *UnassignResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*UnassignResponse) ProtoMessage()
- func (m *UnassignResponse) ProtoSize() (n int)
- func (m *UnassignResponse) Reset()
- func (m *UnassignResponse) String() string
- func (m *UnassignResponse) Unmarshal(dAtA []byte) error
- func (m *UnassignResponse) Validate() error
- func (m *UnassignResponse) XXX_DiscardUnknown()
- func (m *UnassignResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UnassignResponse) XXX_Merge(src proto.Message)
- func (m *UnassignResponse) XXX_Size() int
- func (m *UnassignResponse) XXX_Unmarshal(b []byte) error
- type UnimplementedShardServer
- func (*UnimplementedShardServer) Apply(ctx context.Context, req *ApplyRequest) (*ApplyResponse, error)
- func (*UnimplementedShardServer) GetHints(ctx context.Context, req *GetHintsRequest) (*GetHintsResponse, error)
- func (*UnimplementedShardServer) List(ctx context.Context, req *ListRequest) (*ListResponse, error)
- func (*UnimplementedShardServer) Stat(ctx context.Context, req *StatRequest) (*StatResponse, error)
- func (*UnimplementedShardServer) Unassign(ctx context.Context, req *UnassignRequest) (*UnassignResponse, error)
- type VerifiedAuthServer
- func (s *VerifiedAuthServer) Apply(ctx context.Context, req *ApplyRequest) (*ApplyResponse, error)
- func (s *VerifiedAuthServer) GetHints(ctx context.Context, req *GetHintsRequest) (*GetHintsResponse, error)
- func (s *VerifiedAuthServer) List(ctx context.Context, req *ListRequest) (*ListResponse, error)
- func (s *VerifiedAuthServer) Stat(ctx context.Context, req *StatRequest) (*StatResponse, error)
- func (s *VerifiedAuthServer) Unassign(ctx context.Context, req *UnassignRequest) (*UnassignResponse, error)
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthProtocol = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowProtocol = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupProtocol = fmt.Errorf("proto: unexpected end of group") )
var MaxHotStandbys uint32 = math.MaxUint32
MaxHotStandbys is a global bound on the degree of hot standbys desired by any ShardSpec.
var ReplicaStatus_Code_name = map[int32]string{
0: "IDLE",
100: "BACKFILL",
200: "STANDBY",
300: "PRIMARY",
400: "FAILED",
}
var ReplicaStatus_Code_value = map[string]int32{
"IDLE": 0,
"BACKFILL": 100,
"STANDBY": 200,
"PRIMARY": 300,
"FAILED": 400,
}
var Status_name = map[int32]string{
0: "OK",
1: "SHARD_NOT_FOUND",
2: "NO_SHARD_PRIMARY",
3: "NOT_SHARD_PRIMARY",
4: "ETCD_TRANSACTION_FAILED",
5: "SHARD_STOPPED",
}
var Status_value = map[string]int32{
"OK": 0,
"SHARD_NOT_FOUND": 1,
"NO_SHARD_PRIMARY": 2,
"NOT_SHARD_PRIMARY": 3,
"ETCD_TRANSACTION_FAILED": 4,
"SHARD_STOPPED": 5,
}
Functions ¶
func FlattenProducerStates ¶ added in v0.83.1
func FlattenProducerStates(cp Checkpoint) []message.ProducerState
FlattenProducerStates returns a []ProducerState drawn from the Checkpoint.
func FlattenReadThrough ¶ added in v0.83.1
func FlattenReadThrough(cp Checkpoint) pb.Offsets
FlattenReadThrough returns Offsets drawn from the Checkpoint.
func RegisterShardHandler ¶ added in v0.100.0
RegisterShardHandler registers the http handlers for service Shard to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterShardHandlerClient ¶ added in v0.100.0
func RegisterShardHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ShardClient) error
RegisterShardHandlerClient registers the http handlers for service Shard to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ShardClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ShardClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ShardClient" to call the correct interceptors.
func RegisterShardHandlerFromEndpoint ¶ added in v0.100.0
func RegisterShardHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterShardHandlerFromEndpoint is same as RegisterShardHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterShardHandlerServer ¶ added in v0.100.0
func RegisterShardHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ShardServer) error
RegisterShardHandlerServer registers the http handlers for service Shard to "mux". UnaryRPC :call ShardServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterShardHandlerFromEndpoint instead.
func RegisterShardServer ¶
func RegisterShardServer(s *grpc.Server, srv ShardServer)
Types ¶
type ApplyRequest ¶
type ApplyRequest struct { Changes []ApplyRequest_Change `protobuf:"bytes,1,rep,name=changes,proto3" json:"changes"` // Optional extension of the ApplyRequest. Extension []byte `protobuf:"bytes,100,opt,name=extension,proto3" json:"extension,omitempty"` }
func (*ApplyRequest) Descriptor ¶
func (*ApplyRequest) Descriptor() ([]byte, []int)
func (*ApplyRequest) Marshal ¶
func (m *ApplyRequest) Marshal() (dAtA []byte, err error)
func (*ApplyRequest) MarshalToSizedBuffer ¶ added in v0.86.1
func (m *ApplyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ApplyRequest) ProtoMessage ¶
func (*ApplyRequest) ProtoMessage()
func (*ApplyRequest) ProtoSize ¶
func (m *ApplyRequest) ProtoSize() (n int)
func (*ApplyRequest) Reset ¶
func (m *ApplyRequest) Reset()
func (*ApplyRequest) String ¶
func (m *ApplyRequest) String() string
func (*ApplyRequest) Unmarshal ¶
func (m *ApplyRequest) Unmarshal(dAtA []byte) error
func (*ApplyRequest) Validate ¶
func (m *ApplyRequest) Validate() error
Validate returns an error if the ApplyRequest is not well-formed.
func (*ApplyRequest) XXX_DiscardUnknown ¶
func (m *ApplyRequest) XXX_DiscardUnknown()
func (*ApplyRequest) XXX_Marshal ¶
func (m *ApplyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ApplyRequest) XXX_Merge ¶
func (m *ApplyRequest) XXX_Merge(src proto.Message)
func (*ApplyRequest) XXX_Size ¶
func (m *ApplyRequest) XXX_Size() int
func (*ApplyRequest) XXX_Unmarshal ¶
func (m *ApplyRequest) XXX_Unmarshal(b []byte) error
type ApplyRequest_Change ¶
type ApplyRequest_Change struct { // Expected ModRevision of the current ShardSpec. If the shard is being // created, expect_mod_revision is zero. ExpectModRevision int64 `protobuf:"varint,1,opt,name=expect_mod_revision,json=expectModRevision,proto3" json:"expect_mod_revision,omitempty"` // ShardSpec to be updated (if expect_mod_revision > 0) or created // (if expect_mod_revision == 0). Upsert *ShardSpec `protobuf:"bytes,2,opt,name=upsert,proto3" json:"upsert,omitempty"` // Shard to be deleted. expect_mod_revision must not be zero. Delete ShardID `protobuf:"bytes,3,opt,name=delete,proto3,casttype=ShardID" json:"delete,omitempty"` }
Change defines an insertion, update, or deletion to be applied to the set of ShardSpecs. Exactly one of |upsert| or |delete| must be set.
func (*ApplyRequest_Change) Descriptor ¶
func (*ApplyRequest_Change) Descriptor() ([]byte, []int)
func (*ApplyRequest_Change) Marshal ¶
func (m *ApplyRequest_Change) Marshal() (dAtA []byte, err error)
func (*ApplyRequest_Change) MarshalTo ¶
func (m *ApplyRequest_Change) MarshalTo(dAtA []byte) (int, error)
func (*ApplyRequest_Change) MarshalToSizedBuffer ¶ added in v0.86.1
func (m *ApplyRequest_Change) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ApplyRequest_Change) ProtoMessage ¶
func (*ApplyRequest_Change) ProtoMessage()
func (*ApplyRequest_Change) ProtoSize ¶
func (m *ApplyRequest_Change) ProtoSize() (n int)
func (*ApplyRequest_Change) Reset ¶
func (m *ApplyRequest_Change) Reset()
func (*ApplyRequest_Change) String ¶
func (m *ApplyRequest_Change) String() string
func (*ApplyRequest_Change) Unmarshal ¶
func (m *ApplyRequest_Change) Unmarshal(dAtA []byte) error
func (*ApplyRequest_Change) Validate ¶
func (m *ApplyRequest_Change) Validate() error
Validate returns an error if the ApplyRequest_Change is not well-formed.
func (*ApplyRequest_Change) XXX_DiscardUnknown ¶
func (m *ApplyRequest_Change) XXX_DiscardUnknown()
func (*ApplyRequest_Change) XXX_Marshal ¶
func (m *ApplyRequest_Change) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ApplyRequest_Change) XXX_Merge ¶
func (m *ApplyRequest_Change) XXX_Merge(src proto.Message)
func (*ApplyRequest_Change) XXX_Size ¶
func (m *ApplyRequest_Change) XXX_Size() int
func (*ApplyRequest_Change) XXX_Unmarshal ¶
func (m *ApplyRequest_Change) XXX_Unmarshal(b []byte) error
type ApplyResponse ¶
type ApplyResponse struct { // Status of the Apply RPC. Status Status `protobuf:"varint,1,opt,name=status,proto3,enum=consumer.Status" json:"status,omitempty"` // Header of the response. Header protocol.Header `protobuf:"bytes,2,opt,name=header,proto3" json:"header"` // Optional extension of the ApplyResponse. Extension []byte `protobuf:"bytes,100,opt,name=extension,proto3" json:"extension,omitempty"` }
func (*ApplyResponse) Descriptor ¶
func (*ApplyResponse) Descriptor() ([]byte, []int)
func (*ApplyResponse) Marshal ¶
func (m *ApplyResponse) Marshal() (dAtA []byte, err error)
func (*ApplyResponse) MarshalToSizedBuffer ¶ added in v0.86.1
func (m *ApplyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ApplyResponse) ProtoMessage ¶
func (*ApplyResponse) ProtoMessage()
func (*ApplyResponse) ProtoSize ¶
func (m *ApplyResponse) ProtoSize() (n int)
func (*ApplyResponse) Reset ¶
func (m *ApplyResponse) Reset()
func (*ApplyResponse) String ¶
func (m *ApplyResponse) String() string
func (*ApplyResponse) Unmarshal ¶
func (m *ApplyResponse) Unmarshal(dAtA []byte) error
func (*ApplyResponse) Validate ¶
func (m *ApplyResponse) Validate() error
Validate returns an error if the ApplyResponse is not well-formed.
func (*ApplyResponse) XXX_DiscardUnknown ¶
func (m *ApplyResponse) XXX_DiscardUnknown()
func (*ApplyResponse) XXX_Marshal ¶
func (m *ApplyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ApplyResponse) XXX_Merge ¶
func (m *ApplyResponse) XXX_Merge(src proto.Message)
func (*ApplyResponse) XXX_Size ¶
func (m *ApplyResponse) XXX_Size() int
func (*ApplyResponse) XXX_Unmarshal ¶
func (m *ApplyResponse) XXX_Unmarshal(b []byte) error
type AuthShardClient ¶ added in v0.100.0
type AuthShardClient struct { Authorizer pb.Authorizer Inner ShardClient }
func NewAuthShardClient ¶ added in v0.100.0
func NewAuthShardClient(sc ShardClient, auth pb.Authorizer) *AuthShardClient
NewAuthShardClient returns an *AuthShardClient which uses the Authorizer to obtain and attach an Authorization bearer token to every issued request.
func (*AuthShardClient) Apply ¶ added in v0.100.0
func (a *AuthShardClient) Apply(ctx context.Context, in *ApplyRequest, opts ...grpc.CallOption) (*ApplyResponse, error)
func (*AuthShardClient) GetHints ¶ added in v0.100.0
func (a *AuthShardClient) GetHints(ctx context.Context, in *GetHintsRequest, opts ...grpc.CallOption) (*GetHintsResponse, error)
func (*AuthShardClient) List ¶ added in v0.100.0
func (a *AuthShardClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
func (*AuthShardClient) Stat ¶ added in v0.100.0
func (a *AuthShardClient) Stat(ctx context.Context, in *StatRequest, opts ...grpc.CallOption) (*StatResponse, error)
func (*AuthShardClient) Unassign ¶ added in v0.100.0
func (a *AuthShardClient) Unassign(ctx context.Context, in *UnassignRequest, opts ...grpc.CallOption) (*UnassignResponse, error)
type AuthShardServer ¶ added in v0.100.0
type AuthShardServer interface { Stat(context.Context, pb.Claims, *StatRequest) (*StatResponse, error) List(context.Context, pb.Claims, *ListRequest) (*ListResponse, error) Apply(context.Context, pb.Claims, *ApplyRequest) (*ApplyResponse, error) GetHints(context.Context, pb.Claims, *GetHintsRequest) (*GetHintsResponse, error) Unassign(context.Context, pb.Claims, *UnassignRequest) (*UnassignResponse, error) }
AuthShardServer is similar to ShardServer except:
- Requests have already been verified with accompanying Claims.
- The Context or Stream.Context() argument may be subject to a deadline bound to the expiration of the user's Claims.
type BuildCheckpointArgs ¶ added in v0.83.1
type BuildCheckpointArgs struct { ReadThrough pb.Offsets ProducerStates []message.ProducerState AckIntents []message.AckIntent }
BuildCheckpointArgs are arguments of BuildCheckpoint.
type Checkpoint ¶ added in v0.83.1
type Checkpoint struct { // Sources is metadata of journals consumed by the shard. Sources map[go_gazette_dev_core_broker_protocol.Journal]Checkpoint_Source `` /* 197-byte string literal not displayed */ // AckIntents is acknowledgement intents to be written to journals to which // uncommitted messages were published during the transaction which produced // this Checkpoint. AckIntents map[go_gazette_dev_core_broker_protocol.Journal][]byte `` /* 231-byte string literal not displayed */ }
Checkpoint is processing metadata of a consumer shard which allows for its recovery on fault.
func BuildCheckpoint ¶ added in v0.83.1
func BuildCheckpoint(args BuildCheckpointArgs) Checkpoint
BuildCheckpoint builds a Checkpoint message instance from the arguments.
func (*Checkpoint) Descriptor ¶ added in v0.83.1
func (*Checkpoint) Descriptor() ([]byte, []int)
func (*Checkpoint) Marshal ¶ added in v0.83.1
func (m *Checkpoint) Marshal() (dAtA []byte, err error)
func (*Checkpoint) MarshalTo ¶ added in v0.83.1
func (m *Checkpoint) MarshalTo(dAtA []byte) (int, error)
func (*Checkpoint) MarshalToSizedBuffer ¶ added in v0.86.1
func (m *Checkpoint) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Checkpoint) ProtoMessage ¶ added in v0.83.1
func (*Checkpoint) ProtoMessage()
func (*Checkpoint) ProtoSize ¶ added in v0.83.1
func (m *Checkpoint) ProtoSize() (n int)
func (*Checkpoint) Reset ¶ added in v0.83.1
func (m *Checkpoint) Reset()
func (*Checkpoint) String ¶ added in v0.83.1
func (m *Checkpoint) String() string
func (*Checkpoint) Unmarshal ¶ added in v0.83.1
func (m *Checkpoint) Unmarshal(dAtA []byte) error
func (*Checkpoint) XXX_DiscardUnknown ¶ added in v0.83.1
func (m *Checkpoint) XXX_DiscardUnknown()
func (*Checkpoint) XXX_Marshal ¶ added in v0.83.1
func (m *Checkpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Checkpoint) XXX_Merge ¶ added in v0.83.1
func (m *Checkpoint) XXX_Merge(src proto.Message)
func (*Checkpoint) XXX_Size ¶ added in v0.83.1
func (m *Checkpoint) XXX_Size() int
func (*Checkpoint) XXX_Unmarshal ¶ added in v0.83.1
func (m *Checkpoint) XXX_Unmarshal(b []byte) error
type Checkpoint_ProducerState ¶ added in v0.83.1
type Checkpoint_ProducerState struct { // LastAck is the last acknowledged Clock of this producer. LastAck go_gazette_dev_core_message.Clock `` /* 127-byte string literal not displayed */ // Begin is the offset of the first message byte having CONTINUE_TXN that's // larger than LastAck. Eg, it's the offset which opens the next // transaction. If there is no such message, Begin is -1. Begin go_gazette_dev_core_broker_protocol.Offset `protobuf:"varint,2,opt,name=begin,proto3,casttype=go.gazette.dev/core/broker/protocol.Offset" json:"begin,omitempty"` }
ProducerState is metadata of a producer as-of a read-through journal offset.
func (*Checkpoint_ProducerState) Descriptor ¶ added in v0.83.1
func (*Checkpoint_ProducerState) Descriptor() ([]byte, []int)
func (*Checkpoint_ProducerState) Marshal ¶ added in v0.83.1
func (m *Checkpoint_ProducerState) Marshal() (dAtA []byte, err error)
func (*Checkpoint_ProducerState) MarshalTo ¶ added in v0.83.1
func (m *Checkpoint_ProducerState) MarshalTo(dAtA []byte) (int, error)
func (*Checkpoint_ProducerState) MarshalToSizedBuffer ¶ added in v0.86.1
func (m *Checkpoint_ProducerState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Checkpoint_ProducerState) ProtoMessage ¶ added in v0.83.1
func (*Checkpoint_ProducerState) ProtoMessage()
func (*Checkpoint_ProducerState) ProtoSize ¶ added in v0.83.1
func (m *Checkpoint_ProducerState) ProtoSize() (n int)
func (*Checkpoint_ProducerState) Reset ¶ added in v0.83.1
func (m *Checkpoint_ProducerState) Reset()
func (*Checkpoint_ProducerState) String ¶ added in v0.83.1
func (m *Checkpoint_ProducerState) String() string
func (*Checkpoint_ProducerState) Unmarshal ¶ added in v0.83.1
func (m *Checkpoint_ProducerState) Unmarshal(dAtA []byte) error
func (*Checkpoint_ProducerState) XXX_DiscardUnknown ¶ added in v0.83.1
func (m *Checkpoint_ProducerState) XXX_DiscardUnknown()
func (*Checkpoint_ProducerState) XXX_Marshal ¶ added in v0.83.1
func (m *Checkpoint_ProducerState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Checkpoint_ProducerState) XXX_Merge ¶ added in v0.83.1
func (m *Checkpoint_ProducerState) XXX_Merge(src proto.Message)
func (*Checkpoint_ProducerState) XXX_Size ¶ added in v0.83.1
func (m *Checkpoint_ProducerState) XXX_Size() int
func (*Checkpoint_ProducerState) XXX_Unmarshal ¶ added in v0.83.1
func (m *Checkpoint_ProducerState) XXX_Unmarshal(b []byte) error
type Checkpoint_Source ¶ added in v0.83.1
type Checkpoint_Source struct { // Offset of the journal which has been read-through. ReadThrough go_gazette_dev_core_broker_protocol.Offset `` /* 147-byte string literal not displayed */ Producers []Checkpoint_Source_ProducerEntry `protobuf:"bytes,2,rep,name=producers,proto3" json:"producers"` }
Source is metadata of a consumed source journal.
func (*Checkpoint_Source) Descriptor ¶ added in v0.83.1
func (*Checkpoint_Source) Descriptor() ([]byte, []int)
func (*Checkpoint_Source) Marshal ¶ added in v0.83.1
func (m *Checkpoint_Source) Marshal() (dAtA []byte, err error)
func (*Checkpoint_Source) MarshalTo ¶ added in v0.83.1
func (m *Checkpoint_Source) MarshalTo(dAtA []byte) (int, error)
func (*Checkpoint_Source) MarshalToSizedBuffer ¶ added in v0.86.1
func (m *Checkpoint_Source) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Checkpoint_Source) ProtoMessage ¶ added in v0.83.1
func (*Checkpoint_Source) ProtoMessage()
func (*Checkpoint_Source) ProtoSize ¶ added in v0.83.1
func (m *Checkpoint_Source) ProtoSize() (n int)
func (*Checkpoint_Source) Reset ¶ added in v0.83.1
func (m *Checkpoint_Source) Reset()
func (*Checkpoint_Source) String ¶ added in v0.83.1
func (m *Checkpoint_Source) String() string
func (*Checkpoint_Source) Unmarshal ¶ added in v0.83.1
func (m *Checkpoint_Source) Unmarshal(dAtA []byte) error
func (*Checkpoint_Source) XXX_DiscardUnknown ¶ added in v0.83.1
func (m *Checkpoint_Source) XXX_DiscardUnknown()
func (*Checkpoint_Source) XXX_Marshal ¶ added in v0.83.1
func (m *Checkpoint_Source) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Checkpoint_Source) XXX_Merge ¶ added in v0.83.1
func (m *Checkpoint_Source) XXX_Merge(src proto.Message)
func (*Checkpoint_Source) XXX_Size ¶ added in v0.83.1
func (m *Checkpoint_Source) XXX_Size() int
func (*Checkpoint_Source) XXX_Unmarshal ¶ added in v0.83.1
func (m *Checkpoint_Source) XXX_Unmarshal(b []byte) error
type Checkpoint_Source_ProducerEntry ¶ added in v0.89.0
type Checkpoint_Source_ProducerEntry struct { Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` State Checkpoint_ProducerState `protobuf:"bytes,2,opt,name=state,proto3" json:"state"` }
States of journal producers. Producer keys are 6-byte, RFC 4122 v1 node identifiers (see message.ProducerID).
func (*Checkpoint_Source_ProducerEntry) Descriptor ¶ added in v0.89.0
func (*Checkpoint_Source_ProducerEntry) Descriptor() ([]byte, []int)
func (*Checkpoint_Source_ProducerEntry) Marshal ¶ added in v0.89.0
func (m *Checkpoint_Source_ProducerEntry) Marshal() (dAtA []byte, err error)
func (*Checkpoint_Source_ProducerEntry) MarshalTo ¶ added in v0.89.0
func (m *Checkpoint_Source_ProducerEntry) MarshalTo(dAtA []byte) (int, error)
func (*Checkpoint_Source_ProducerEntry) MarshalToSizedBuffer ¶ added in v0.89.0
func (m *Checkpoint_Source_ProducerEntry) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Checkpoint_Source_ProducerEntry) ProtoMessage ¶ added in v0.89.0
func (*Checkpoint_Source_ProducerEntry) ProtoMessage()
func (*Checkpoint_Source_ProducerEntry) ProtoSize ¶ added in v0.89.0
func (m *Checkpoint_Source_ProducerEntry) ProtoSize() (n int)
func (*Checkpoint_Source_ProducerEntry) Reset ¶ added in v0.89.0
func (m *Checkpoint_Source_ProducerEntry) Reset()
func (*Checkpoint_Source_ProducerEntry) String ¶ added in v0.89.0
func (m *Checkpoint_Source_ProducerEntry) String() string
func (*Checkpoint_Source_ProducerEntry) Unmarshal ¶ added in v0.89.0
func (m *Checkpoint_Source_ProducerEntry) Unmarshal(dAtA []byte) error
func (*Checkpoint_Source_ProducerEntry) XXX_DiscardUnknown ¶ added in v0.89.0
func (m *Checkpoint_Source_ProducerEntry) XXX_DiscardUnknown()
func (*Checkpoint_Source_ProducerEntry) XXX_Marshal ¶ added in v0.89.0
func (m *Checkpoint_Source_ProducerEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Checkpoint_Source_ProducerEntry) XXX_Merge ¶ added in v0.89.0
func (m *Checkpoint_Source_ProducerEntry) XXX_Merge(src proto.Message)
func (*Checkpoint_Source_ProducerEntry) XXX_Size ¶ added in v0.89.0
func (m *Checkpoint_Source_ProducerEntry) XXX_Size() int
func (*Checkpoint_Source_ProducerEntry) XXX_Unmarshal ¶ added in v0.89.0
func (m *Checkpoint_Source_ProducerEntry) XXX_Unmarshal(b []byte) error
type ConsumerSpec ¶
type ConsumerSpec struct { // ProcessSpec of the consumer. protocol.ProcessSpec `protobuf:"bytes,1,opt,name=process_spec,json=processSpec,proto3,embedded=process_spec" json:"process_spec" yaml:",inline"` // Maximum number of assigned Shards. ShardLimit uint32 `protobuf:"varint,2,opt,name=shard_limit,json=shardLimit,proto3" json:"shard_limit,omitempty"` }
ConsumerSpec describes a Consumer process instance and its configuration. It serves as a allocator MemberValue.
func (*ConsumerSpec) Descriptor ¶
func (*ConsumerSpec) Descriptor() ([]byte, []int)
func (*ConsumerSpec) ItemLimit ¶
func (m *ConsumerSpec) ItemLimit() int
ItemLimit is the maximum number of shards this consumer may process. allocator.MemberValue implementation.
func (*ConsumerSpec) Marshal ¶
func (m *ConsumerSpec) Marshal() (dAtA []byte, err error)
func (*ConsumerSpec) MarshalString ¶
func (m *ConsumerSpec) MarshalString() string
MarshalString returns the marshaled encoding of the ConsumerSpec as a string.
func (*ConsumerSpec) MarshalToSizedBuffer ¶ added in v0.86.1
func (m *ConsumerSpec) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ConsumerSpec) ProtoMessage ¶
func (*ConsumerSpec) ProtoMessage()
func (*ConsumerSpec) ProtoSize ¶
func (m *ConsumerSpec) ProtoSize() (n int)
func (*ConsumerSpec) Reset ¶
func (m *ConsumerSpec) Reset()
func (*ConsumerSpec) String ¶
func (m *ConsumerSpec) String() string
func (*ConsumerSpec) Unmarshal ¶
func (m *ConsumerSpec) Unmarshal(dAtA []byte) error
func (*ConsumerSpec) Validate ¶
func (m *ConsumerSpec) Validate() error
Validate returns an error if the ConsumerSpec is not well-formed.
func (*ConsumerSpec) XXX_DiscardUnknown ¶
func (m *ConsumerSpec) XXX_DiscardUnknown()
func (*ConsumerSpec) XXX_Marshal ¶
func (m *ConsumerSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ConsumerSpec) XXX_Merge ¶
func (m *ConsumerSpec) XXX_Merge(src proto.Message)
func (*ConsumerSpec) XXX_Size ¶
func (m *ConsumerSpec) XXX_Size() int
func (*ConsumerSpec) XXX_Unmarshal ¶
func (m *ConsumerSpec) XXX_Unmarshal(b []byte) error
func (*ConsumerSpec) ZeroLimit ¶
func (m *ConsumerSpec) ZeroLimit()
ZeroLimit zeros the ConsumerSpec ShardLimit.
type GetHintsRequest ¶
type GetHintsRequest struct { // Shard to fetch hints for. Shard ShardID `protobuf:"bytes,1,opt,name=shard,proto3,casttype=ShardID" json:"shard,omitempty"` // Optional extension of the GetHintsRequest. Extension []byte `protobuf:"bytes,100,opt,name=extension,proto3" json:"extension,omitempty"` }
func (*GetHintsRequest) Descriptor ¶
func (*GetHintsRequest) Descriptor() ([]byte, []int)
func (*GetHintsRequest) Marshal ¶
func (m *GetHintsRequest) Marshal() (dAtA []byte, err error)
func (*GetHintsRequest) MarshalToSizedBuffer ¶ added in v0.86.1
func (m *GetHintsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GetHintsRequest) ProtoMessage ¶
func (*GetHintsRequest) ProtoMessage()
func (*GetHintsRequest) ProtoSize ¶
func (m *GetHintsRequest) ProtoSize() (n int)
func (*GetHintsRequest) Reset ¶
func (m *GetHintsRequest) Reset()
func (*GetHintsRequest) String ¶
func (m *GetHintsRequest) String() string
func (*GetHintsRequest) Unmarshal ¶
func (m *GetHintsRequest) Unmarshal(dAtA []byte) error
func (*GetHintsRequest) Validate ¶
func (m *GetHintsRequest) Validate() error
Validate returns an error if the HintsRequest is not well-formed.
func (*GetHintsRequest) XXX_DiscardUnknown ¶
func (m *GetHintsRequest) XXX_DiscardUnknown()
func (*GetHintsRequest) XXX_Marshal ¶
func (m *GetHintsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetHintsRequest) XXX_Merge ¶
func (m *GetHintsRequest) XXX_Merge(src proto.Message)
func (*GetHintsRequest) XXX_Size ¶
func (m *GetHintsRequest) XXX_Size() int
func (*GetHintsRequest) XXX_Unmarshal ¶
func (m *GetHintsRequest) XXX_Unmarshal(b []byte) error
type GetHintsResponse ¶
type GetHintsResponse struct { // Status of the Hints RPC. Status Status `protobuf:"varint,1,opt,name=status,proto3,enum=consumer.Status" json:"status,omitempty"` // Header of the response. Header protocol.Header `protobuf:"bytes,2,opt,name=header,proto3" json:"header"` // Primary hints for the shard. PrimaryHints GetHintsResponse_ResponseHints `protobuf:"bytes,3,opt,name=primary_hints,json=primaryHints,proto3" json:"primary_hints"` // List of backup hints for a shard. The most recent recovery log hints will // be first, any subsequent hints are for historical backup. If there is no // value for a hint key the value corresponding hints will be nil. BackupHints []GetHintsResponse_ResponseHints `protobuf:"bytes,4,rep,name=backup_hints,json=backupHints,proto3" json:"backup_hints"` // Optional extension of the GetHintsResponse. Extension []byte `protobuf:"bytes,100,opt,name=extension,proto3" json:"extension,omitempty"` }
func (*GetHintsResponse) Descriptor ¶
func (*GetHintsResponse) Descriptor() ([]byte, []int)
func (*GetHintsResponse) Marshal ¶
func (m *GetHintsResponse) Marshal() (dAtA []byte, err error)
func (*GetHintsResponse) MarshalToSizedBuffer ¶ added in v0.86.1
func (m *GetHintsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GetHintsResponse) ProtoMessage ¶
func (*GetHintsResponse) ProtoMessage()
func (*GetHintsResponse) ProtoSize ¶
func (m *GetHintsResponse) ProtoSize() (n int)
func (*GetHintsResponse) Reset ¶
func (m *GetHintsResponse) Reset()
func (*GetHintsResponse) String ¶
func (m *GetHintsResponse) String() string
func (*GetHintsResponse) Unmarshal ¶
func (m *GetHintsResponse) Unmarshal(dAtA []byte) error
func (*GetHintsResponse) Validate ¶
func (m *GetHintsResponse) Validate() error
Validate returns an error if the HintsResponse is not well-formed.
func (*GetHintsResponse) XXX_DiscardUnknown ¶
func (m *GetHintsResponse) XXX_DiscardUnknown()
func (*GetHintsResponse) XXX_Marshal ¶
func (m *GetHintsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetHintsResponse) XXX_Merge ¶
func (m *GetHintsResponse) XXX_Merge(src proto.Message)
func (*GetHintsResponse) XXX_Size ¶
func (m *GetHintsResponse) XXX_Size() int
func (*GetHintsResponse) XXX_Unmarshal ¶
func (m *GetHintsResponse) XXX_Unmarshal(b []byte) error
type GetHintsResponse_ResponseHints ¶
type GetHintsResponse_ResponseHints struct { // If the hints value does not exist Hints will be nil. Hints *recoverylog.FSMHints `protobuf:"bytes,1,opt,name=hints,proto3" json:"hints,omitempty"` }
func (*GetHintsResponse_ResponseHints) Descriptor ¶
func (*GetHintsResponse_ResponseHints) Descriptor() ([]byte, []int)
func (*GetHintsResponse_ResponseHints) Marshal ¶
func (m *GetHintsResponse_ResponseHints) Marshal() (dAtA []byte, err error)
func (*GetHintsResponse_ResponseHints) MarshalTo ¶
func (m *GetHintsResponse_ResponseHints) MarshalTo(dAtA []byte) (int, error)
func (*GetHintsResponse_ResponseHints) MarshalToSizedBuffer ¶ added in v0.86.1
func (m *GetHintsResponse_ResponseHints) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GetHintsResponse_ResponseHints) ProtoMessage ¶
func (*GetHintsResponse_ResponseHints) ProtoMessage()
func (*GetHintsResponse_ResponseHints) ProtoSize ¶
func (m *GetHintsResponse_ResponseHints) ProtoSize() (n int)
func (*GetHintsResponse_ResponseHints) Reset ¶
func (m *GetHintsResponse_ResponseHints) Reset()
func (*GetHintsResponse_ResponseHints) String ¶
func (m *GetHintsResponse_ResponseHints) String() string
func (*GetHintsResponse_ResponseHints) Unmarshal ¶
func (m *GetHintsResponse_ResponseHints) Unmarshal(dAtA []byte) error
func (GetHintsResponse_ResponseHints) Validate ¶
func (m GetHintsResponse_ResponseHints) Validate() error
Validate returns an error if the GetHintsResponse_ResponseHints is not well-formed.
func (*GetHintsResponse_ResponseHints) XXX_DiscardUnknown ¶
func (m *GetHintsResponse_ResponseHints) XXX_DiscardUnknown()
func (*GetHintsResponse_ResponseHints) XXX_Marshal ¶
func (m *GetHintsResponse_ResponseHints) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetHintsResponse_ResponseHints) XXX_Merge ¶
func (m *GetHintsResponse_ResponseHints) XXX_Merge(src proto.Message)
func (*GetHintsResponse_ResponseHints) XXX_Size ¶
func (m *GetHintsResponse_ResponseHints) XXX_Size() int
func (*GetHintsResponse_ResponseHints) XXX_Unmarshal ¶
func (m *GetHintsResponse_ResponseHints) XXX_Unmarshal(b []byte) error
type ListRequest ¶
type ListRequest struct { // Selector optionally refines the set of shards which will be enumerated. // If zero-valued, all shards are returned. Otherwise, only ShardSpecs // matching the LabelSelector will be returned. One meta-label "id" is // additionally supported by the selector, where "id=example-shard-ID" // will match a ShardSpec with ID "example-shard-ID". Selector protocol.LabelSelector `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector"` // Optional extension of the ListRequest. Extension []byte `protobuf:"bytes,100,opt,name=extension,proto3" json:"extension,omitempty"` }
func (*ListRequest) Descriptor ¶
func (*ListRequest) Descriptor() ([]byte, []int)
func (*ListRequest) Marshal ¶
func (m *ListRequest) Marshal() (dAtA []byte, err error)
func (*ListRequest) MarshalToSizedBuffer ¶ added in v0.86.1
func (m *ListRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ListRequest) ProtoMessage ¶
func (*ListRequest) ProtoMessage()
func (*ListRequest) ProtoSize ¶
func (m *ListRequest) ProtoSize() (n int)
func (*ListRequest) Reset ¶
func (m *ListRequest) Reset()
func (*ListRequest) String ¶
func (m *ListRequest) String() string
func (*ListRequest) Unmarshal ¶
func (m *ListRequest) Unmarshal(dAtA []byte) error
func (*ListRequest) Validate ¶
func (m *ListRequest) Validate() error
Validate returns an error if the ListRequest is not well-formed.
func (*ListRequest) XXX_DiscardUnknown ¶
func (m *ListRequest) XXX_DiscardUnknown()
func (*ListRequest) XXX_Marshal ¶
func (m *ListRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListRequest) XXX_Merge ¶
func (m *ListRequest) XXX_Merge(src proto.Message)
func (*ListRequest) XXX_Size ¶
func (m *ListRequest) XXX_Size() int
func (*ListRequest) XXX_Unmarshal ¶
func (m *ListRequest) XXX_Unmarshal(b []byte) error
type ListResponse ¶
type ListResponse struct { // Status of the List RPC. Status Status `protobuf:"varint,1,opt,name=status,proto3,enum=consumer.Status" json:"status,omitempty"` // Header of the response. Header protocol.Header `protobuf:"bytes,2,opt,name=header,proto3" json:"header"` Shards []ListResponse_Shard `protobuf:"bytes,3,rep,name=shards,proto3" json:"shards"` // Optional extension of the ListResponse. Extension []byte `protobuf:"bytes,100,opt,name=extension,proto3" json:"extension,omitempty"` }
func (*ListResponse) Descriptor ¶
func (*ListResponse) Descriptor() ([]byte, []int)
func (*ListResponse) Marshal ¶
func (m *ListResponse) Marshal() (dAtA []byte, err error)
func (*ListResponse) MarshalToSizedBuffer ¶ added in v0.86.1
func (m *ListResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ListResponse) ProtoMessage ¶
func (*ListResponse) ProtoMessage()
func (*ListResponse) ProtoSize ¶
func (m *ListResponse) ProtoSize() (n int)
func (*ListResponse) Reset ¶
func (m *ListResponse) Reset()
func (*ListResponse) String ¶
func (m *ListResponse) String() string
func (*ListResponse) Unmarshal ¶
func (m *ListResponse) Unmarshal(dAtA []byte) error
func (*ListResponse) Validate ¶
func (m *ListResponse) Validate() error
Validate returns an error if the ListResponse is not well-formed.
func (*ListResponse) XXX_DiscardUnknown ¶
func (m *ListResponse) XXX_DiscardUnknown()
func (*ListResponse) XXX_Marshal ¶
func (m *ListResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListResponse) XXX_Merge ¶
func (m *ListResponse) XXX_Merge(src proto.Message)
func (*ListResponse) XXX_Size ¶
func (m *ListResponse) XXX_Size() int
func (*ListResponse) XXX_Unmarshal ¶
func (m *ListResponse) XXX_Unmarshal(b []byte) error
type ListResponse_Shard ¶
type ListResponse_Shard struct { Spec ShardSpec `protobuf:"bytes,1,opt,name=spec,proto3" json:"spec"` // Current Etcd ModRevision of the ShardSpec. ModRevision int64 `protobuf:"varint,2,opt,name=mod_revision,json=modRevision,proto3" json:"mod_revision,omitempty"` // Route of the shard, including endpoints. Route protocol.Route `protobuf:"bytes,3,opt,name=route,proto3" json:"route"` // Status of each replica. Cardinality and ordering matches |route|. Status []ReplicaStatus `protobuf:"bytes,4,rep,name=status,proto3" json:"status"` // Etcd CreateRevision of the JournalSpec. CreateRevision int64 `protobuf:"varint,5,opt,name=create_revision,json=createRevision,proto3" json:"create_revision,omitempty"` }
Shards of the response.
func (*ListResponse_Shard) Descriptor ¶
func (*ListResponse_Shard) Descriptor() ([]byte, []int)
func (*ListResponse_Shard) Marshal ¶
func (m *ListResponse_Shard) Marshal() (dAtA []byte, err error)
func (*ListResponse_Shard) MarshalTo ¶
func (m *ListResponse_Shard) MarshalTo(dAtA []byte) (int, error)
func (*ListResponse_Shard) MarshalToSizedBuffer ¶ added in v0.86.1
func (m *ListResponse_Shard) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ListResponse_Shard) ProtoMessage ¶
func (*ListResponse_Shard) ProtoMessage()
func (*ListResponse_Shard) ProtoSize ¶
func (m *ListResponse_Shard) ProtoSize() (n int)
func (*ListResponse_Shard) Reset ¶
func (m *ListResponse_Shard) Reset()
func (*ListResponse_Shard) String ¶
func (m *ListResponse_Shard) String() string
func (*ListResponse_Shard) Unmarshal ¶
func (m *ListResponse_Shard) Unmarshal(dAtA []byte) error
func (*ListResponse_Shard) Validate ¶
func (m *ListResponse_Shard) Validate() error
Validate returns an error if the ListResponse_Shard is not well-formed.
func (*ListResponse_Shard) XXX_DiscardUnknown ¶
func (m *ListResponse_Shard) XXX_DiscardUnknown()
func (*ListResponse_Shard) XXX_Marshal ¶
func (m *ListResponse_Shard) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListResponse_Shard) XXX_Merge ¶
func (m *ListResponse_Shard) XXX_Merge(src proto.Message)
func (*ListResponse_Shard) XXX_Size ¶
func (m *ListResponse_Shard) XXX_Size() int
func (*ListResponse_Shard) XXX_Unmarshal ¶
func (m *ListResponse_Shard) XXX_Unmarshal(b []byte) error
type ReplicaStatus ¶
type ReplicaStatus struct { Code ReplicaStatus_Code `protobuf:"varint,1,opt,name=code,proto3,enum=consumer.ReplicaStatus_Code" json:"code,omitempty"` // Errors encountered during replica processing. Set iff |code| is FAILED. Errors []string `protobuf:"bytes,2,rep,name=errors,proto3" json:"errors,omitempty"` }
ReplicaStatus is the status of a ShardSpec assigned to a ConsumerSpec. It serves as an allocator AssignmentValue. ReplicaStatus is reduced by taking the maximum enum value among statuses. Eg, if a primary is PRIMARY, one replica is BACKFILL and the other STANDBY, then the status is PRIMARY. If one of the replicas transitioned to FAILED, than the status is FAILED. This reduction behavior is used to summarize status across all replicas.
func (*ReplicaStatus) Descriptor ¶
func (*ReplicaStatus) Descriptor() ([]byte, []int)
func (*ReplicaStatus) Marshal ¶
func (m *ReplicaStatus) Marshal() (dAtA []byte, err error)
func (*ReplicaStatus) MarshalString ¶
func (m *ReplicaStatus) MarshalString() string
MarshalString returns the marshaled encoding of the ReplicaStatus as a string.
func (*ReplicaStatus) MarshalToSizedBuffer ¶ added in v0.86.1
func (m *ReplicaStatus) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ReplicaStatus) ProtoMessage ¶
func (*ReplicaStatus) ProtoMessage()
func (*ReplicaStatus) ProtoSize ¶
func (m *ReplicaStatus) ProtoSize() (n int)
func (*ReplicaStatus) Reduce ¶
func (m *ReplicaStatus) Reduce(other *ReplicaStatus)
Reduce folds another ReplicaStatus into this one.
func (*ReplicaStatus) Reset ¶
func (m *ReplicaStatus) Reset()
func (*ReplicaStatus) String ¶
func (m *ReplicaStatus) String() string
func (*ReplicaStatus) Unmarshal ¶
func (m *ReplicaStatus) Unmarshal(dAtA []byte) error
func (*ReplicaStatus) Validate ¶
func (m *ReplicaStatus) Validate() error
Validate returns an error if the ReplicaStatus is not well-formed.
func (*ReplicaStatus) XXX_DiscardUnknown ¶
func (m *ReplicaStatus) XXX_DiscardUnknown()
func (*ReplicaStatus) XXX_Marshal ¶
func (m *ReplicaStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ReplicaStatus) XXX_Merge ¶
func (m *ReplicaStatus) XXX_Merge(src proto.Message)
func (*ReplicaStatus) XXX_Size ¶
func (m *ReplicaStatus) XXX_Size() int
func (*ReplicaStatus) XXX_Unmarshal ¶
func (m *ReplicaStatus) XXX_Unmarshal(b []byte) error
type ReplicaStatus_Code ¶
type ReplicaStatus_Code int32
const ( ReplicaStatus_IDLE ReplicaStatus_Code = 0 // The replica is actively playing the historical recovery log. ReplicaStatus_BACKFILL ReplicaStatus_Code = 100 // The replica has finished playing the historical recovery log and is // live-tailing it to locally mirror recorded operations as they are // produced. It can take over as primary at any time. // // Shards not having recovery logs immediately transition to STANDBY. ReplicaStatus_STANDBY ReplicaStatus_Code = 200 // The replica is actively serving as primary. ReplicaStatus_PRIMARY ReplicaStatus_Code = 300 // The replica has encountered an unrecoverable error. ReplicaStatus_FAILED ReplicaStatus_Code = 400 )
func (ReplicaStatus_Code) EnumDescriptor ¶
func (ReplicaStatus_Code) EnumDescriptor() ([]byte, []int)
func (ReplicaStatus_Code) String ¶
func (x ReplicaStatus_Code) String() string
func (ReplicaStatus_Code) Validate ¶
func (x ReplicaStatus_Code) Validate() error
Validate returns an error if the ReplicaStatus_Code is not well-formed.
type RoutedShardClient ¶
type RoutedShardClient interface { ShardClient pb.DispatchRouter }
RoutedShardClient composes a ShardClient and DispatchRouter.
func NewRoutedShardClient ¶
func NewRoutedShardClient(sc ShardClient, dr pb.DispatchRouter) RoutedShardClient
NewRoutedShardClient composes a ShardClient and DispatchRouter.
type ShardClient ¶
type ShardClient interface { // Stat returns detailed status of a given Shard. Stat(ctx context.Context, in *StatRequest, opts ...grpc.CallOption) (*StatResponse, error) // List Shards, their ShardSpecs and their processing status. List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) // Apply changes to the collection of Shards managed by the consumer. Apply(ctx context.Context, in *ApplyRequest, opts ...grpc.CallOption) (*ApplyResponse, error) // GetHints fetches hints for a shard. GetHints(ctx context.Context, in *GetHintsRequest, opts ...grpc.CallOption) (*GetHintsResponse, error) // Unassign a Shard. Unassign(ctx context.Context, in *UnassignRequest, opts ...grpc.CallOption) (*UnassignResponse, error) }
ShardClient is the client API for Shard service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewShardClient ¶
func NewShardClient(cc *grpc.ClientConn) ShardClient
type ShardID ¶
type ShardID string
ShardID uniquely identifies a shard processed by a Gazette consumer.
type ShardServer ¶
type ShardServer interface { // Stat returns detailed status of a given Shard. Stat(context.Context, *StatRequest) (*StatResponse, error) // List Shards, their ShardSpecs and their processing status. List(context.Context, *ListRequest) (*ListResponse, error) // Apply changes to the collection of Shards managed by the consumer. Apply(context.Context, *ApplyRequest) (*ApplyResponse, error) // GetHints fetches hints for a shard. GetHints(context.Context, *GetHintsRequest) (*GetHintsResponse, error) // Unassign a Shard. Unassign(context.Context, *UnassignRequest) (*UnassignResponse, error) }
ShardServer is the server API for Shard service.
type ShardSpec ¶
type ShardSpec struct { // ID of the shard. Id ShardID `protobuf:"bytes,1,opt,name=id,proto3,casttype=ShardID" json:"id,omitempty" yaml:",omitempty"` // Sources of the shard, uniquely ordered on Source journal. Sources []ShardSpec_Source `protobuf:"bytes,2,rep,name=sources,proto3" json:"sources" yaml:",omitempty"` // Prefix of the Journal into which the shard's recovery log will be recorded. // The complete Journal name is built as "{recovery_log_prefix}/{shard_id}". // If empty, the shard does not use a recovery log. RecoveryLogPrefix string `` /* 151-byte string literal not displayed */ // Prefix of Etcd keys into which recovery log FSMHints are written to and // read from. FSMHints allow readers of the recovery log to efficiently // determine the minimum fragments of log which must be read to fully recover // local store state. The complete hint key written by the shard primary is: // // "{hint_prefix}/{shard_id}.primary" // // The primary will regularly produce updated hints into this key, and // players of the log will similarly utilize hints from this key. // If |recovery_log_prefix| is set, |hint_prefix| must be also. HintPrefix string `protobuf:"bytes,4,opt,name=hint_prefix,json=hintPrefix,proto3" json:"hint_prefix,omitempty" yaml:"hint_prefix,omitempty"` // Backups of verified recovery log FSMHints, retained as a disaster-recovery // mechanism. On completing playback, a player will write recovered hints to: // // "{hints_prefix}/{shard_id}.backup.0". // // It also move hints previously stored under // "{hints_prefix/{shard_id}.backup.0" to // "{hints_prefix/{shard_id}.backup.1", and so on, keeping at most // |hint_backups| distinct sets of FSMHints. // // In the case of disaster or data-loss, these copied hints can be an // important fallback for recovering a consistent albeit older version of the // shard's store, with each relying on only progressively older portions of // the recovery log. // // When pruning the recovery log, log fragments which are older than (and no // longer required by) the *oldest* backup are discarded, ensuring that // all hints remain valid for playback. HintBackups int32 `protobuf:"varint,5,opt,name=hint_backups,json=hintBackups,proto3" json:"hint_backups,omitempty" yaml:"hint_backups,omitempty"` // Max duration of shard transactions. This duration upper-bounds the amount // of time during which a transaction may process messages before it must // flush and commit. It may run for less time if an input message stall occurs // (eg, no decoded journal message is ready without blocking). A typical value // would be `1s`: applications which perform extensive aggregation over // message streams exhibiting locality of "hot" keys may benefit from larger // values. MaxTxnDuration time.Duration `` /* 141-byte string literal not displayed */ // Min duration of shard transactions. This duration lower-bounds the amount // of time during which a transaction must process messages before it may // flush and commit. It may run for more time if additional messages are // available (eg, decoded journal messages are ready without blocking). Note // also that transactions are pipelined: a current transaction may process // messages while a prior transaction's recovery log writes flush to Gazette, // but it cannot prepare to commit until the prior transaction writes // complete. In other words even if |min_txn_quantum| is zero, some degree of // message batching is expected due to the network delay inherent in Gazette // writes. A typical value of would be `0s`: applications which perform // extensive aggregation may benefit from larger values. MinTxnDuration time.Duration `` /* 141-byte string literal not displayed */ // Disable processing of the shard. Disable bool `protobuf:"varint,8,opt,name=disable,proto3" json:"disable,omitempty" yaml:",omitempty"` // Hot standbys is the desired number of consumer processes which should be // replicating the primary consumer's recovery log. Standbys are allocated in // a separate availability zone of the current primary, and tail the live log // to continuously mirror the primary's on-disk DB file structure. Should the // primary experience failure, one of the hot standbys will be assigned to // take over as the new shard primary, which is accomplished by simply opening // its local copy of the recovered store files. // // Note that under regular operation, shard hand-off is zero downtime even if // standbys are zero, as the current primary will not cede ownership until the // replacement process declares itself ready. However, without standbys a // process failure will leave the shard without an active primary while its // replacement starts and completes playback of its recovery log. HotStandbys uint32 `protobuf:"varint,9,opt,name=hot_standbys,json=hotStandbys,proto3" json:"hot_standbys,omitempty" yaml:"hot_standbys,omitempty"` // User-defined Labels of this ShardSpec. The label "id" is reserved and may // not be used with a ShardSpec's labels. protocol.LabelSet `protobuf:"bytes,10,opt,name=labels,proto3,embedded=labels" json:"labels" yaml:",omitempty,inline"` // Disable waiting for acknowledgements of pending message(s). // // If a consumer transaction reads uncommitted messages, it will by default // remain open (subject to the max duration) awaiting an acknowledgement of // those messages, in the hope that that acknowledgement will be quickly // forthcoming and, by remaining open, we can process all messages in this // transaction. Effectively we're trading a small amount of increased local // latency for a global reduction in end-to-end latency. // // This works well for acyclic message flows, but can introduce unnecessary // stalls if there are message cycles between shards. In the simplest case, // a transaction could block awaiting an ACK of a message that it itself // produced -- an ACK which can't arrive until the transaction closes. DisableWaitForAck bool `` /* 156-byte string literal not displayed */ // Size of the ring buffer used to sequence read-uncommitted messages // into consumed, read-committed ones. The ring buffer is a performance // optimization only: applications will replay portions of journals as // needed when messages aren't available in the buffer. // It can remain small if source journal transactions are small, // but larger transactions will achieve better performance with a // larger ring. // If zero, a reasonable default (currently 8192) is used. RingBufferSize uint32 `` /* 141-byte string literal not displayed */ // Size of the channel used to bridge message read and decode with // sequencing and consumption. Larger values may reduce data stalls, // particularly for larger transactions and/or bursty custom // MessageProducer implementations. // If zero, a reasonable default (currently 8192) is used. ReadChannelSize uint32 `` /* 145-byte string literal not displayed */ }
ShardSpec describes a shard and its configuration, and is the long-lived unit of work and scaling for a consumer application. Each shard is allocated to a one "primary" at-a-time selected from the current processes of a consumer application, and is re-assigned on process fault or exit.
ShardSpecs describe all configuration of the shard and its processing, including journals to consume, configuration for processing transactions, its recovery log, hot standbys, etc. ShardSpecs may be further extended with domain-specific labels & values to further define application behavior. ShardSpec is-a allocator.ItemValue.
func IntersectShardSpecs ¶
IntersectShardSpecs returns a ShardSpec having a non-zero-valued field for each field value which is shared between |a| and |b|.
func SubtractShardSpecs ¶
SubtractShardSpecs returns a ShardSpec derived from |a| but having a zero-valued field for each field which is matched by |b|.
func UnionShardSpecs ¶
UnionShardSpecs returns a ShardSpec combining all non-zero-valued fields across |a| and |b|. Where both |a| and |b| provide a non-zero value for a field, the value of |a| is retained.
func (*ShardSpec) Descriptor ¶
func (*ShardSpec) DesiredReplication ¶
DesiredReplication is the desired number of shard replicas. allocator.ItemValue implementation.
func (*ShardSpec) HintBackupKeys ¶
HintBackupKeys returns Etcd keys to which verified, disaster-recovery hints are written.
func (*ShardSpec) HintPrimaryKey ¶
HintPrimaryKey returns the Etcd key to which recorded, primary hints are written.
func (*ShardSpec) LabelSetExt ¶ added in v0.100.0
LabelSetExt adds additional metadata labels to the LabelSet of the ShardSpec, returning the result. The result is built by truncating `buf` and then appending the merged LabelSet.
func (*ShardSpec) MarshalString ¶
MarshalString returns the marshaled encoding of the ShardSpec as a string.
func (*ShardSpec) MarshalToSizedBuffer ¶ added in v0.86.1
func (*ShardSpec) ProtoMessage ¶
func (*ShardSpec) ProtoMessage()
func (*ShardSpec) RecoveryLog ¶
RecoveryLog returns the Journal to which the Shard's recovery log is recorded. IF the Shard has no recovery log, "" is returned..
func (*ShardSpec) XXX_DiscardUnknown ¶
func (m *ShardSpec) XXX_DiscardUnknown()
func (*ShardSpec) XXX_Marshal ¶
func (*ShardSpec) XXX_Unmarshal ¶
type ShardSpec_Source ¶
type ShardSpec_Source struct { // Journal which this shard is consuming. Journal go_gazette_dev_core_broker_protocol.Journal `protobuf:"bytes,1,opt,name=journal,proto3,casttype=go.gazette.dev/core/broker/protocol.Journal" json:"journal,omitempty"` // Minimum journal byte offset the shard should begin reading from. // Typically this should be zero, as read offsets are check-pointed and // restored from the shard's Store as it processes. |min_offset| can be // useful for shard initialization, directing it to skip over historical // portions of the journal not needed for the application's use case. MinOffset go_gazette_dev_core_broker_protocol.Offset `` /* 169-byte string literal not displayed */ }
Sources define the set of journals which this shard consumes. At least one Source must be specified, and in many use cases only one will be needed. For use cases which can benefit, multiple sources may be specified to represent a "join" over messages of distinct journals.
Note the effective mapping of messages to each of the joined journals should align (eg, joining a journal of customer updates with one of orders, where both are mapped on customer ID). This typically means the partitioning of the two event "topics" must be the same.
Another powerful pattern is to shard on partitions of a high-volume event stream, and also have each shard join against all events of a low-volume stream. For example, a shard might ingest and index "viewed product" events, read a comparably low-volume "purchase" event stream, and on each purchase publish the bundle of its corresponding prior product views.
func (*ShardSpec_Source) Descriptor ¶
func (*ShardSpec_Source) Descriptor() ([]byte, []int)
func (*ShardSpec_Source) Equal ¶ added in v0.99.0
func (this *ShardSpec_Source) Equal(that interface{}) bool
func (*ShardSpec_Source) Marshal ¶
func (m *ShardSpec_Source) Marshal() (dAtA []byte, err error)
func (*ShardSpec_Source) MarshalToSizedBuffer ¶ added in v0.86.1
func (m *ShardSpec_Source) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ShardSpec_Source) ProtoMessage ¶
func (*ShardSpec_Source) ProtoMessage()
func (*ShardSpec_Source) ProtoSize ¶
func (m *ShardSpec_Source) ProtoSize() (n int)
func (*ShardSpec_Source) Reset ¶
func (m *ShardSpec_Source) Reset()
func (*ShardSpec_Source) String ¶
func (m *ShardSpec_Source) String() string
func (*ShardSpec_Source) Unmarshal ¶
func (m *ShardSpec_Source) Unmarshal(dAtA []byte) error
func (*ShardSpec_Source) Validate ¶
func (m *ShardSpec_Source) Validate() error
Validate returns an error if the ShardSpec_Source is not well-formed.
func (*ShardSpec_Source) XXX_DiscardUnknown ¶
func (m *ShardSpec_Source) XXX_DiscardUnknown()
func (*ShardSpec_Source) XXX_Marshal ¶
func (m *ShardSpec_Source) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ShardSpec_Source) XXX_Merge ¶
func (m *ShardSpec_Source) XXX_Merge(src proto.Message)
func (*ShardSpec_Source) XXX_Size ¶
func (m *ShardSpec_Source) XXX_Size() int
func (*ShardSpec_Source) XXX_Unmarshal ¶
func (m *ShardSpec_Source) XXX_Unmarshal(b []byte) error
type StatRequest ¶
type StatRequest struct { // Header may be attached by a proxying consumer peer. Header *protocol.Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` // Shard to Stat. Shard ShardID `protobuf:"bytes,2,opt,name=shard,proto3,casttype=ShardID" json:"shard,omitempty"` // Journals and offsets which must be reflected in a completed consumer // transaction before Stat returns, blocking if required. Offsets of journals // not read by this shard are ignored. ReadThrough map[go_gazette_dev_core_broker_protocol.Journal]go_gazette_dev_core_broker_protocol.Offset `` /* 288-byte string literal not displayed */ // Optional extension of the StatRequest. Extension []byte `protobuf:"bytes,100,opt,name=extension,proto3" json:"extension,omitempty"` }
func (*StatRequest) Descriptor ¶
func (*StatRequest) Descriptor() ([]byte, []int)
func (*StatRequest) Marshal ¶
func (m *StatRequest) Marshal() (dAtA []byte, err error)
func (*StatRequest) MarshalToSizedBuffer ¶ added in v0.86.1
func (m *StatRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*StatRequest) ProtoMessage ¶
func (*StatRequest) ProtoMessage()
func (*StatRequest) ProtoSize ¶
func (m *StatRequest) ProtoSize() (n int)
func (*StatRequest) Reset ¶
func (m *StatRequest) Reset()
func (*StatRequest) String ¶
func (m *StatRequest) String() string
func (*StatRequest) Unmarshal ¶
func (m *StatRequest) Unmarshal(dAtA []byte) error
func (*StatRequest) Validate ¶
func (m *StatRequest) Validate() error
Validate returns an error if the StatRequest is not well-formed.
func (*StatRequest) XXX_DiscardUnknown ¶
func (m *StatRequest) XXX_DiscardUnknown()
func (*StatRequest) XXX_Marshal ¶
func (m *StatRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StatRequest) XXX_Merge ¶
func (m *StatRequest) XXX_Merge(src proto.Message)
func (*StatRequest) XXX_Size ¶
func (m *StatRequest) XXX_Size() int
func (*StatRequest) XXX_Unmarshal ¶
func (m *StatRequest) XXX_Unmarshal(b []byte) error
type StatResponse ¶
type StatResponse struct { // Status of the Stat RPC. Status Status `protobuf:"varint,1,opt,name=status,proto3,enum=consumer.Status" json:"status,omitempty"` // Header of the response. Header protocol.Header `protobuf:"bytes,2,opt,name=header,proto3" json:"header"` // Journals and offsets read through by the most recent completed consumer // transaction. ReadThrough map[go_gazette_dev_core_broker_protocol.Journal]go_gazette_dev_core_broker_protocol.Offset `` /* 288-byte string literal not displayed */ // Journals and offsets this shard has published through, including // acknowledgements, as-of the most recent completed consumer transaction. // // Formally, if an acknowledged message A results in this shard publishing // messages B, and A falls within |read_through|, then all messages B & their // acknowledgements fall within |publish_at|. // // The composition of |read_through| and |publish_at| allow CQRS applications // to provide read-your-writes consistency, even if written events pass // through multiple intermediate consumers and arbitrary transformations // before arriving at the materialized view which is ultimately queried. PublishAt map[go_gazette_dev_core_broker_protocol.Journal]go_gazette_dev_core_broker_protocol.Offset `` /* 282-byte string literal not displayed */ // Optional extension of the StatResponse. Extension []byte `protobuf:"bytes,100,opt,name=extension,proto3" json:"extension,omitempty"` }
func (*StatResponse) Descriptor ¶
func (*StatResponse) Descriptor() ([]byte, []int)
func (*StatResponse) Marshal ¶
func (m *StatResponse) Marshal() (dAtA []byte, err error)
func (*StatResponse) MarshalToSizedBuffer ¶ added in v0.86.1
func (m *StatResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*StatResponse) ProtoMessage ¶
func (*StatResponse) ProtoMessage()
func (*StatResponse) ProtoSize ¶
func (m *StatResponse) ProtoSize() (n int)
func (*StatResponse) Reset ¶
func (m *StatResponse) Reset()
func (*StatResponse) String ¶
func (m *StatResponse) String() string
func (*StatResponse) Unmarshal ¶
func (m *StatResponse) Unmarshal(dAtA []byte) error
func (*StatResponse) Validate ¶
func (m *StatResponse) Validate() error
Validate returns an error if the StatResponse is not well-formed.
func (*StatResponse) XXX_DiscardUnknown ¶
func (m *StatResponse) XXX_DiscardUnknown()
func (*StatResponse) XXX_Marshal ¶
func (m *StatResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StatResponse) XXX_Merge ¶
func (m *StatResponse) XXX_Merge(src proto.Message)
func (*StatResponse) XXX_Size ¶
func (m *StatResponse) XXX_Size() int
func (*StatResponse) XXX_Unmarshal ¶
func (m *StatResponse) XXX_Unmarshal(b []byte) error
type Status ¶
type Status int32
Status is a response status code, used across Gazette Consumer RPC APIs.
const ( Status_OK Status = 0 // The named shard does not exist. Status_SHARD_NOT_FOUND Status = 1 // There is no current primary consumer process for the shard. This is a // temporary condition which should quickly resolve, assuming sufficient // consumer capacity. Status_NO_SHARD_PRIMARY Status = 2 // The present consumer process is not the assigned primary for the shard, // and was not instructed to proxy the request. Status_NOT_SHARD_PRIMARY Status = 3 // The Etcd transaction failed. Returned by Update RPC when an // expect_mod_revision of the UpdateRequest differs from the current // ModRevision of the ShardSpec within the store. Status_ETCD_TRANSACTION_FAILED Status = 4 // The current primary shard has stopped, either due to reassignment or // processing failure, and will not make further progress toward the // requested operation. // For example, a Stat RPC will return SHARD_STOPPED if the StatRequest // cannot be satisfied. Status_SHARD_STOPPED Status = 5 )
func (Status) EnumDescriptor ¶
type UnassignRequest ¶ added in v0.99.0
type UnassignRequest struct { // Shards to unassign. Shards []ShardID `protobuf:"bytes,1,rep,name=shards,proto3,casttype=ShardID" json:"shards,omitempty"` // Only unassign shards which have a primary in FAILED status. OnlyFailed bool `protobuf:"varint,2,opt,name=only_failed,json=onlyFailed,proto3" json:"only_failed,omitempty"` // Avoids actually removing any shard assignments, but the response will // report which shards would have been affected. DryRun bool `protobuf:"varint,3,opt,name=dry_run,json=dryRun,proto3" json:"dry_run,omitempty"` }
func (*UnassignRequest) Descriptor ¶ added in v0.99.0
func (*UnassignRequest) Descriptor() ([]byte, []int)
func (*UnassignRequest) Marshal ¶ added in v0.99.0
func (m *UnassignRequest) Marshal() (dAtA []byte, err error)
func (*UnassignRequest) MarshalTo ¶ added in v0.99.0
func (m *UnassignRequest) MarshalTo(dAtA []byte) (int, error)
func (*UnassignRequest) MarshalToSizedBuffer ¶ added in v0.99.0
func (m *UnassignRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*UnassignRequest) ProtoMessage ¶ added in v0.99.0
func (*UnassignRequest) ProtoMessage()
func (*UnassignRequest) ProtoSize ¶ added in v0.99.0
func (m *UnassignRequest) ProtoSize() (n int)
func (*UnassignRequest) Reset ¶ added in v0.99.0
func (m *UnassignRequest) Reset()
func (*UnassignRequest) String ¶ added in v0.99.0
func (m *UnassignRequest) String() string
func (*UnassignRequest) Unmarshal ¶ added in v0.99.0
func (m *UnassignRequest) Unmarshal(dAtA []byte) error
func (*UnassignRequest) Validate ¶ added in v0.99.0
func (m *UnassignRequest) Validate() error
Validate returns an error if the UnassignRequest is not well-formed.
func (*UnassignRequest) XXX_DiscardUnknown ¶ added in v0.99.0
func (m *UnassignRequest) XXX_DiscardUnknown()
func (*UnassignRequest) XXX_Marshal ¶ added in v0.99.0
func (m *UnassignRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*UnassignRequest) XXX_Merge ¶ added in v0.99.0
func (m *UnassignRequest) XXX_Merge(src proto.Message)
func (*UnassignRequest) XXX_Size ¶ added in v0.99.0
func (m *UnassignRequest) XXX_Size() int
func (*UnassignRequest) XXX_Unmarshal ¶ added in v0.99.0
func (m *UnassignRequest) XXX_Unmarshal(b []byte) error
type UnassignResponse ¶ added in v0.99.0
type UnassignResponse struct { // Status of the Unassign RPC. Status Status `protobuf:"varint,1,opt,name=status,proto3,enum=consumer.Status" json:"status,omitempty"` // Shards which had assignments removed. Shards []ShardID `protobuf:"bytes,2,rep,name=shards,proto3,casttype=ShardID" json:"shards,omitempty"` }
func (*UnassignResponse) Descriptor ¶ added in v0.99.0
func (*UnassignResponse) Descriptor() ([]byte, []int)
func (*UnassignResponse) Marshal ¶ added in v0.99.0
func (m *UnassignResponse) Marshal() (dAtA []byte, err error)
func (*UnassignResponse) MarshalTo ¶ added in v0.99.0
func (m *UnassignResponse) MarshalTo(dAtA []byte) (int, error)
func (*UnassignResponse) MarshalToSizedBuffer ¶ added in v0.99.0
func (m *UnassignResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*UnassignResponse) ProtoMessage ¶ added in v0.99.0
func (*UnassignResponse) ProtoMessage()
func (*UnassignResponse) ProtoSize ¶ added in v0.99.0
func (m *UnassignResponse) ProtoSize() (n int)
func (*UnassignResponse) Reset ¶ added in v0.99.0
func (m *UnassignResponse) Reset()
func (*UnassignResponse) String ¶ added in v0.99.0
func (m *UnassignResponse) String() string
func (*UnassignResponse) Unmarshal ¶ added in v0.99.0
func (m *UnassignResponse) Unmarshal(dAtA []byte) error
func (*UnassignResponse) Validate ¶ added in v0.99.0
func (m *UnassignResponse) Validate() error
Validate returns an error if the UnassignResponse is not well-formed.
func (*UnassignResponse) XXX_DiscardUnknown ¶ added in v0.99.0
func (m *UnassignResponse) XXX_DiscardUnknown()
func (*UnassignResponse) XXX_Marshal ¶ added in v0.99.0
func (m *UnassignResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*UnassignResponse) XXX_Merge ¶ added in v0.99.0
func (m *UnassignResponse) XXX_Merge(src proto.Message)
func (*UnassignResponse) XXX_Size ¶ added in v0.99.0
func (m *UnassignResponse) XXX_Size() int
func (*UnassignResponse) XXX_Unmarshal ¶ added in v0.99.0
func (m *UnassignResponse) XXX_Unmarshal(b []byte) error
type UnimplementedShardServer ¶ added in v0.86.1
type UnimplementedShardServer struct { }
UnimplementedShardServer can be embedded to have forward compatible implementations.
func (*UnimplementedShardServer) Apply ¶ added in v0.86.1
func (*UnimplementedShardServer) Apply(ctx context.Context, req *ApplyRequest) (*ApplyResponse, error)
func (*UnimplementedShardServer) GetHints ¶ added in v0.86.1
func (*UnimplementedShardServer) GetHints(ctx context.Context, req *GetHintsRequest) (*GetHintsResponse, error)
func (*UnimplementedShardServer) List ¶ added in v0.86.1
func (*UnimplementedShardServer) List(ctx context.Context, req *ListRequest) (*ListResponse, error)
func (*UnimplementedShardServer) Stat ¶ added in v0.86.1
func (*UnimplementedShardServer) Stat(ctx context.Context, req *StatRequest) (*StatResponse, error)
func (*UnimplementedShardServer) Unassign ¶ added in v0.99.0
func (*UnimplementedShardServer) Unassign(ctx context.Context, req *UnassignRequest) (*UnassignResponse, error)
type VerifiedAuthServer ¶ added in v0.100.0
type VerifiedAuthServer struct { Verifier pb.Verifier Inner AuthShardServer }
func NewVerifiedShardServer ¶ added in v0.100.0
func NewVerifiedShardServer(ajs AuthShardServer, verifier pb.Verifier) *VerifiedAuthServer
NewVerifiedShardServer adapts an AuthShardServer into a ShardServer by using the provided Verifier to verify incoming request Authorizations.
func (*VerifiedAuthServer) Apply ¶ added in v0.100.0
func (s *VerifiedAuthServer) Apply(ctx context.Context, req *ApplyRequest) (*ApplyResponse, error)
func (*VerifiedAuthServer) GetHints ¶ added in v0.100.0
func (s *VerifiedAuthServer) GetHints(ctx context.Context, req *GetHintsRequest) (*GetHintsResponse, error)
func (*VerifiedAuthServer) List ¶ added in v0.100.0
func (s *VerifiedAuthServer) List(ctx context.Context, req *ListRequest) (*ListResponse, error)
func (*VerifiedAuthServer) Stat ¶ added in v0.100.0
func (s *VerifiedAuthServer) Stat(ctx context.Context, req *StatRequest) (*StatResponse, error)
func (*VerifiedAuthServer) Unassign ¶ added in v0.100.0
func (s *VerifiedAuthServer) Unassign(ctx context.Context, req *UnassignRequest) (*UnassignResponse, error)