Documentation ¶
Overview ¶
Package logdog contains Version 1 of the LogDog Coordinator backend service interface.
The package name here must match the protobuf package name, as the generated files will reside in the same directory.
Package logdog is a generated protocol buffer package.
It is generated from these files:
github.com/luci/luci-go/logdog/api/endpoints/coordinator/services/v1/service.proto github.com/luci/luci-go/logdog/api/endpoints/coordinator/services/v1/state.proto github.com/luci/luci-go/logdog/api/endpoints/coordinator/services/v1/tasks.proto
It has these top-level messages:
GetConfigResponse RegisterStreamRequest RegisterStreamResponse LoadStreamRequest LoadStreamResponse TerminateStreamRequest ArchiveStreamRequest LogStreamState ArchiveDispatchTask ArchiveTask
Index ¶
- Variables
- func FileDescriptorSet() *descriptor.FileDescriptorSet
- func RegisterServicesServer(s prpc.Registrar, srv ServicesServer)
- type ArchiveDispatchTask
- func (*ArchiveDispatchTask) Descriptor() ([]byte, []int)
- func (m *ArchiveDispatchTask) GetCompletePeriod() *google_protobuf.Duration
- func (m *ArchiveDispatchTask) GetId() string
- func (m *ArchiveDispatchTask) GetSettleDelay() *google_protobuf.Duration
- func (m *ArchiveDispatchTask) GetTag() ArchiveDispatchTask_Tag
- func (*ArchiveDispatchTask) ProtoMessage()
- func (m *ArchiveDispatchTask) Reset()
- func (m *ArchiveDispatchTask) String() string
- type ArchiveDispatchTask_Tag
- type ArchiveStreamRequest
- func (ar *ArchiveStreamRequest) Complete() bool
- func (*ArchiveStreamRequest) Descriptor() ([]byte, []int)
- func (m *ArchiveStreamRequest) GetDataSize() int64
- func (m *ArchiveStreamRequest) GetDataUrl() string
- func (m *ArchiveStreamRequest) GetError() string
- func (m *ArchiveStreamRequest) GetId() string
- func (m *ArchiveStreamRequest) GetIndexSize() int64
- func (m *ArchiveStreamRequest) GetIndexUrl() string
- func (m *ArchiveStreamRequest) GetLogEntryCount() int64
- func (ar *ArchiveStreamRequest) GetMessageProject() string
- func (m *ArchiveStreamRequest) GetProject() string
- func (m *ArchiveStreamRequest) GetStreamSize() int64
- func (m *ArchiveStreamRequest) GetStreamUrl() string
- func (m *ArchiveStreamRequest) GetTerminalIndex() int64
- func (*ArchiveStreamRequest) ProtoMessage()
- func (m *ArchiveStreamRequest) Reset()
- func (m *ArchiveStreamRequest) String() string
- type ArchiveTask
- func (*ArchiveTask) Descriptor() ([]byte, []int)
- func (m *ArchiveTask) GetCompletePeriod() *google_protobuf.Duration
- func (m *ArchiveTask) GetDispatchedAt() *google_protobuf2.Timestamp
- func (m *ArchiveTask) GetId() string
- func (m *ArchiveTask) GetKey() []byte
- func (m *ArchiveTask) GetProject() string
- func (m *ArchiveTask) GetSettleDelay() *google_protobuf.Duration
- func (*ArchiveTask) ProtoMessage()
- func (m *ArchiveTask) Reset()
- func (m *ArchiveTask) String() string
- type DecoratedServices
- func (s *DecoratedServices) ArchiveStream(c context.Context, req *ArchiveStreamRequest) (rsp *google_protobuf1.Empty, err error)
- func (s *DecoratedServices) GetConfig(c context.Context, req *google_protobuf1.Empty) (rsp *GetConfigResponse, err error)
- func (s *DecoratedServices) LoadStream(c context.Context, req *LoadStreamRequest) (rsp *LoadStreamResponse, err error)
- func (s *DecoratedServices) RegisterStream(c context.Context, req *RegisterStreamRequest) (rsp *RegisterStreamResponse, err error)
- func (s *DecoratedServices) TerminateStream(c context.Context, req *TerminateStreamRequest) (rsp *google_protobuf1.Empty, err error)
- type GetConfigResponse
- func (*GetConfigResponse) Descriptor() ([]byte, []int)
- func (m *GetConfigResponse) GetConfigServiceHost() string
- func (m *GetConfigResponse) GetConfigServiceUrl() string
- func (m *GetConfigResponse) GetConfigSet() string
- func (m *GetConfigResponse) GetServiceConfigPath() string
- func (*GetConfigResponse) ProtoMessage()
- func (m *GetConfigResponse) Reset()
- func (m *GetConfigResponse) String() string
- type LoadStreamRequest
- func (*LoadStreamRequest) Descriptor() ([]byte, []int)
- func (m *LoadStreamRequest) GetDesc() bool
- func (m *LoadStreamRequest) GetId() string
- func (ar *LoadStreamRequest) GetMessageProject() string
- func (m *LoadStreamRequest) GetProject() string
- func (*LoadStreamRequest) ProtoMessage()
- func (m *LoadStreamRequest) Reset()
- func (m *LoadStreamRequest) String() string
- type LoadStreamResponse
- func (*LoadStreamResponse) Descriptor() ([]byte, []int)
- func (m *LoadStreamResponse) GetAge() *google_protobuf.Duration
- func (m *LoadStreamResponse) GetArchivalKey() []byte
- func (m *LoadStreamResponse) GetDesc() []byte
- func (m *LoadStreamResponse) GetState() *LogStreamState
- func (*LoadStreamResponse) ProtoMessage()
- func (m *LoadStreamResponse) Reset()
- func (m *LoadStreamResponse) String() string
- type LogStreamState
- func (*LogStreamState) Descriptor() ([]byte, []int)
- func (m *LogStreamState) GetArchived() bool
- func (m *LogStreamState) GetProtoVersion() string
- func (m *LogStreamState) GetPurged() bool
- func (m *LogStreamState) GetSecret() []byte
- func (m *LogStreamState) GetTerminalIndex() int64
- func (*LogStreamState) ProtoMessage()
- func (m *LogStreamState) Reset()
- func (m *LogStreamState) String() string
- type RegisterStreamRequest
- func (*RegisterStreamRequest) Descriptor() ([]byte, []int)
- func (m *RegisterStreamRequest) GetDesc() []byte
- func (ar *RegisterStreamRequest) GetMessageProject() string
- func (m *RegisterStreamRequest) GetProject() string
- func (m *RegisterStreamRequest) GetProtoVersion() string
- func (m *RegisterStreamRequest) GetSecret() []byte
- func (m *RegisterStreamRequest) GetTerminalIndex() int64
- func (*RegisterStreamRequest) ProtoMessage()
- func (m *RegisterStreamRequest) Reset()
- func (m *RegisterStreamRequest) String() string
- type RegisterStreamResponse
- func (*RegisterStreamResponse) Descriptor() ([]byte, []int)
- func (m *RegisterStreamResponse) GetId() string
- func (m *RegisterStreamResponse) GetState() *LogStreamState
- func (*RegisterStreamResponse) ProtoMessage()
- func (m *RegisterStreamResponse) Reset()
- func (m *RegisterStreamResponse) String() string
- type ServicesClient
- type ServicesServer
- type TerminateStreamRequest
- func (*TerminateStreamRequest) Descriptor() ([]byte, []int)
- func (m *TerminateStreamRequest) GetId() string
- func (ar *TerminateStreamRequest) GetMessageProject() string
- func (m *TerminateStreamRequest) GetProject() string
- func (m *TerminateStreamRequest) GetSecret() []byte
- func (m *TerminateStreamRequest) GetTerminalIndex() int64
- func (*TerminateStreamRequest) ProtoMessage()
- func (m *TerminateStreamRequest) Reset()
- func (m *TerminateStreamRequest) String() string
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func FileDescriptorSet ¶
func FileDescriptorSet() *descriptor.FileDescriptorSet
FileDescriptorSet returns a descriptor set for this proto package, which includes all defined services, and all transitive dependencies.
Will not return nil.
Do NOT modify the returned descriptor.
func RegisterServicesServer ¶
func RegisterServicesServer(s prpc.Registrar, srv ServicesServer)
Types ¶
type ArchiveDispatchTask ¶
type ArchiveDispatchTask struct { // The hash ID for the log stream to archive. Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Tag ArchiveDispatchTask_Tag `protobuf:"varint,2,opt,name=tag,enum=logdog.ArchiveDispatchTask_Tag" json:"tag,omitempty"` // Don't waste time archiving the log stream until it is at least this old. // // This is in place to prevent overly-aggressive archivals from wasting time // trying, then failing, becuase the log stream data is still being collected // into intermediate storage. SettleDelay *google_protobuf.Duration `protobuf:"bytes,3,opt,name=settle_delay,json=settleDelay" json:"settle_delay,omitempty"` // The amount of time after the task was created that log stream completeness // will be used as a success criteria. If the task's age is older than this // value, completeness will not be enforced. // // The task's age can be calculated by subtracting its lease expiration time // (leaseTimestamp) from its enqueued timestamp (enqueueTimestamp). CompletePeriod *google_protobuf.Duration `protobuf:"bytes,4,opt,name=complete_period,json=completePeriod" json:"complete_period,omitempty"` }
ArchiveDispatchTask is an internal task used by the Coordinator to schedule an archival dispatch.
func (*ArchiveDispatchTask) Descriptor ¶
func (*ArchiveDispatchTask) Descriptor() ([]byte, []int)
func (*ArchiveDispatchTask) GetCompletePeriod ¶
func (m *ArchiveDispatchTask) GetCompletePeriod() *google_protobuf.Duration
func (*ArchiveDispatchTask) GetId ¶
func (m *ArchiveDispatchTask) GetId() string
func (*ArchiveDispatchTask) GetSettleDelay ¶
func (m *ArchiveDispatchTask) GetSettleDelay() *google_protobuf.Duration
func (*ArchiveDispatchTask) GetTag ¶
func (m *ArchiveDispatchTask) GetTag() ArchiveDispatchTask_Tag
func (*ArchiveDispatchTask) ProtoMessage ¶
func (*ArchiveDispatchTask) ProtoMessage()
func (*ArchiveDispatchTask) Reset ¶
func (m *ArchiveDispatchTask) Reset()
func (*ArchiveDispatchTask) String ¶
func (m *ArchiveDispatchTask) String() string
type ArchiveDispatchTask_Tag ¶
type ArchiveDispatchTask_Tag int32
The type of archival task.
const ( ArchiveDispatchTask_TERMINATED ArchiveDispatchTask_Tag = 0 ArchiveDispatchTask_EXPIRED ArchiveDispatchTask_Tag = 1 )
func (ArchiveDispatchTask_Tag) EnumDescriptor ¶
func (ArchiveDispatchTask_Tag) EnumDescriptor() ([]byte, []int)
func (ArchiveDispatchTask_Tag) String ¶
func (x ArchiveDispatchTask_Tag) String() string
type ArchiveStreamRequest ¶
type ArchiveStreamRequest struct { // The log stream's project. Project string `protobuf:"bytes,1,opt,name=project" json:"project,omitempty"` // The Coordinator ID of the log stream that was archived. Id string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"` // The number of log entries that were archived. LogEntryCount int64 `protobuf:"varint,3,opt,name=log_entry_count,json=logEntryCount" json:"log_entry_count,omitempty"` // The highest log stream index that was archived. TerminalIndex int64 `protobuf:"varint,4,opt,name=terminal_index,json=terminalIndex" json:"terminal_index,omitempty"` // If not empty, there was an archival error. // // This field serves to indicate that an error occured (being non-empty) and // to supply an value that will show up in the Coordinator ArchiveStream // endpoint logs. Error string `protobuf:"bytes,5,opt,name=error" json:"error,omitempty"` // The archive URL of the log stream's stream data. StreamUrl string `protobuf:"bytes,10,opt,name=stream_url,json=streamUrl" json:"stream_url,omitempty"` // The size of the log stream's stream data. StreamSize int64 `protobuf:"varint,11,opt,name=stream_size,json=streamSize" json:"stream_size,omitempty"` // The archive URL of the log stream's index data. IndexUrl string `protobuf:"bytes,20,opt,name=index_url,json=indexUrl" json:"index_url,omitempty"` // The size of the log stream's index data. IndexSize int64 `protobuf:"varint,21,opt,name=index_size,json=indexSize" json:"index_size,omitempty"` // The archive URL of the log stream's binary data. DataUrl string `protobuf:"bytes,30,opt,name=data_url,json=dataUrl" json:"data_url,omitempty"` // The size of the log stream's binary data. DataSize int64 `protobuf:"varint,31,opt,name=data_size,json=dataSize" json:"data_size,omitempty"` }
ArchiveStreamRequest is the set of caller-supplied data for the ArchiveStream service endpoint.
func (*ArchiveStreamRequest) Complete ¶
func (ar *ArchiveStreamRequest) Complete() bool
Complete returns true if the archive request expresses that the archived log stream was complete.
A log stream is complete if every entry between zero and its terminal index is included.
func (*ArchiveStreamRequest) Descriptor ¶
func (*ArchiveStreamRequest) Descriptor() ([]byte, []int)
func (*ArchiveStreamRequest) GetDataSize ¶
func (m *ArchiveStreamRequest) GetDataSize() int64
func (*ArchiveStreamRequest) GetDataUrl ¶
func (m *ArchiveStreamRequest) GetDataUrl() string
func (*ArchiveStreamRequest) GetError ¶
func (m *ArchiveStreamRequest) GetError() string
func (*ArchiveStreamRequest) GetId ¶
func (m *ArchiveStreamRequest) GetId() string
func (*ArchiveStreamRequest) GetIndexSize ¶
func (m *ArchiveStreamRequest) GetIndexSize() int64
func (*ArchiveStreamRequest) GetIndexUrl ¶
func (m *ArchiveStreamRequest) GetIndexUrl() string
func (*ArchiveStreamRequest) GetLogEntryCount ¶
func (m *ArchiveStreamRequest) GetLogEntryCount() int64
func (*ArchiveStreamRequest) GetMessageProject ¶
func (ar *ArchiveStreamRequest) GetMessageProject() string
GetMessageProject implements ProjectBoundMessage.
func (*ArchiveStreamRequest) GetProject ¶
func (m *ArchiveStreamRequest) GetProject() string
func (*ArchiveStreamRequest) GetStreamSize ¶
func (m *ArchiveStreamRequest) GetStreamSize() int64
func (*ArchiveStreamRequest) GetStreamUrl ¶
func (m *ArchiveStreamRequest) GetStreamUrl() string
func (*ArchiveStreamRequest) GetTerminalIndex ¶
func (m *ArchiveStreamRequest) GetTerminalIndex() int64
func (*ArchiveStreamRequest) ProtoMessage ¶
func (*ArchiveStreamRequest) ProtoMessage()
func (*ArchiveStreamRequest) Reset ¶
func (m *ArchiveStreamRequest) Reset()
func (*ArchiveStreamRequest) String ¶
func (m *ArchiveStreamRequest) String() string
type ArchiveTask ¶
type ArchiveTask struct { // The name of the project that this stream is bound to. Project string `protobuf:"bytes,1,opt,name=project" json:"project,omitempty"` // The hash ID of the log stream to archive. Id string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"` // The archival key of the log stream. If this key doesn't match the key in // the log stream state, the request is superfluous and should be deleted. Key []byte `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` // Don't waste time archiving the log stream until it is at least this old. // // This is in place to prevent overly-aggressive archivals from wasting time // trying, then failing, becuase the log stream data is still being collected // into intermediate storage. SettleDelay *google_protobuf.Duration `protobuf:"bytes,4,opt,name=settle_delay,json=settleDelay" json:"settle_delay,omitempty"` // The amount of time after the task was created that log stream completeness // will be used as a success criteria. If the task's age is older than this // value, completeness will not be enforced. // // The task's age can be calculated by subtracting its lease expiration time // (leaseTimestamp) from its enqueued timestamp (enqueueTimestamp). CompletePeriod *google_protobuf.Duration `protobuf:"bytes,5,opt,name=complete_period,json=completePeriod" json:"complete_period,omitempty"` // The time when this archive task was dispatched. // // This time is optional, and will be based on the Coordinator's clock. If not // zero, it can be used by the Archivist to avoid superfluous archival // processing by asserting that IF this time is close to the Archivist's local // clock by a specific threshold, it will punt the archival task. // // Because archival is dispatched by Tumble, the actual encoding of archival // parameters is oftentimes delayed such that the request is dispatched to // Pub/Sub before the datastore has been updated. DispatchedAt *google_protobuf2.Timestamp `protobuf:"bytes,6,opt,name=dispatched_at,json=dispatchedAt" json:"dispatched_at,omitempty"` }
ArchiveTask is a task queue task description for the archival of a single log stream.
func (*ArchiveTask) Descriptor ¶
func (*ArchiveTask) Descriptor() ([]byte, []int)
func (*ArchiveTask) GetCompletePeriod ¶
func (m *ArchiveTask) GetCompletePeriod() *google_protobuf.Duration
func (*ArchiveTask) GetDispatchedAt ¶
func (m *ArchiveTask) GetDispatchedAt() *google_protobuf2.Timestamp
func (*ArchiveTask) GetId ¶
func (m *ArchiveTask) GetId() string
func (*ArchiveTask) GetKey ¶
func (m *ArchiveTask) GetKey() []byte
func (*ArchiveTask) GetProject ¶
func (m *ArchiveTask) GetProject() string
func (*ArchiveTask) GetSettleDelay ¶
func (m *ArchiveTask) GetSettleDelay() *google_protobuf.Duration
func (*ArchiveTask) ProtoMessage ¶
func (*ArchiveTask) ProtoMessage()
func (*ArchiveTask) Reset ¶
func (m *ArchiveTask) Reset()
func (*ArchiveTask) String ¶
func (m *ArchiveTask) String() string
type DecoratedServices ¶
type DecoratedServices struct { // Service is the service to decorate. Service ServicesServer // Prelude is called for each method before forwarding the call to Service. // If Prelude returns an error, then the call is skipped and the error is // processed via the Postlude (if one is defined), or it is returned directly. Prelude func(c context.Context, methodName string, req proto.Message) (context.Context, error) // Postlude is called for each method after Service has processed the call, or // after the Prelude has returned an error. This takes the the Service's // response proto (which may be nil) and/or any error. The decorated // service will return the response (possibly mutated) and error that Postlude // returns. Postlude func(c context.Context, methodName string, rsp proto.Message, err error) error }
func (*DecoratedServices) ArchiveStream ¶
func (s *DecoratedServices) ArchiveStream(c context.Context, req *ArchiveStreamRequest) (rsp *google_protobuf1.Empty, err error)
func (*DecoratedServices) GetConfig ¶
func (s *DecoratedServices) GetConfig(c context.Context, req *google_protobuf1.Empty) (rsp *GetConfigResponse, err error)
func (*DecoratedServices) LoadStream ¶
func (s *DecoratedServices) LoadStream(c context.Context, req *LoadStreamRequest) (rsp *LoadStreamResponse, err error)
func (*DecoratedServices) RegisterStream ¶
func (s *DecoratedServices) RegisterStream(c context.Context, req *RegisterStreamRequest) (rsp *RegisterStreamResponse, err error)
func (*DecoratedServices) TerminateStream ¶
func (s *DecoratedServices) TerminateStream(c context.Context, req *TerminateStreamRequest) (rsp *google_protobuf1.Empty, err error)
type GetConfigResponse ¶
type GetConfigResponse struct { // The API URL of the base "luci-config" service. If empty, the default // service URL will be used. ConfigServiceUrl string `protobuf:"bytes,1,opt,name=config_service_url,json=configServiceUrl" json:"config_service_url,omitempty"` // The name of the configuration set to load from. ConfigSet string `protobuf:"bytes,2,opt,name=config_set,json=configSet" json:"config_set,omitempty"` // The path of the text-serialized service configuration protobuf. ServiceConfigPath string `protobuf:"bytes,3,opt,name=service_config_path,json=serviceConfigPath" json:"service_config_path,omitempty"` // The host name of the configuration service. This is preferred to // "config_service_url". ConfigServiceHost string `protobuf:"bytes,4,opt,name=config_service_host,json=configServiceHost" json:"config_service_host,omitempty"` }
GetConfigResponse is the response structure for the user "GetConfig" endpoint.
func (*GetConfigResponse) Descriptor ¶
func (*GetConfigResponse) Descriptor() ([]byte, []int)
func (*GetConfigResponse) GetConfigServiceHost ¶
func (m *GetConfigResponse) GetConfigServiceHost() string
func (*GetConfigResponse) GetConfigServiceUrl ¶
func (m *GetConfigResponse) GetConfigServiceUrl() string
func (*GetConfigResponse) GetConfigSet ¶
func (m *GetConfigResponse) GetConfigSet() string
func (*GetConfigResponse) GetServiceConfigPath ¶
func (m *GetConfigResponse) GetServiceConfigPath() string
func (*GetConfigResponse) ProtoMessage ¶
func (*GetConfigResponse) ProtoMessage()
func (*GetConfigResponse) Reset ¶
func (m *GetConfigResponse) Reset()
func (*GetConfigResponse) String ¶
func (m *GetConfigResponse) String() string
type LoadStreamRequest ¶
type LoadStreamRequest struct { // The log stream's project. Project string `protobuf:"bytes,1,opt,name=project" json:"project,omitempty"` // The log stream's path Coordinator ID. Id string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"` // If true, include the log stream descriptor. Desc bool `protobuf:"varint,3,opt,name=desc" json:"desc,omitempty"` }
LoadStreamRequest loads the current state of a log stream.
func (*LoadStreamRequest) Descriptor ¶
func (*LoadStreamRequest) Descriptor() ([]byte, []int)
func (*LoadStreamRequest) GetDesc ¶
func (m *LoadStreamRequest) GetDesc() bool
func (*LoadStreamRequest) GetId ¶
func (m *LoadStreamRequest) GetId() string
func (*LoadStreamRequest) GetMessageProject ¶
func (ar *LoadStreamRequest) GetMessageProject() string
GetMessageProject implements ProjectBoundMessage.
func (*LoadStreamRequest) GetProject ¶
func (m *LoadStreamRequest) GetProject() string
func (*LoadStreamRequest) ProtoMessage ¶
func (*LoadStreamRequest) ProtoMessage()
func (*LoadStreamRequest) Reset ¶
func (m *LoadStreamRequest) Reset()
func (*LoadStreamRequest) String ¶
func (m *LoadStreamRequest) String() string
type LoadStreamResponse ¶
type LoadStreamResponse struct { // The state of the requested log stream. State *LogStreamState `protobuf:"bytes,1,opt,name=state" json:"state,omitempty"` // If requested, the serialized log stream descriptor. The protobuf version // of this descriptor will match the "proto_version" field in "state". Desc []byte `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"` // The age of the log stream. Age *google_protobuf.Duration `protobuf:"bytes,3,opt,name=age" json:"age,omitempty"` // The archival key of the log stream. If this key doesn't match the key in // the archival request, the request is superfluous and should be deleted. ArchivalKey []byte `protobuf:"bytes,4,opt,name=archival_key,json=archivalKey,proto3" json:"archival_key,omitempty"` }
The response message for the LoadStream RPC.
func (*LoadStreamResponse) Descriptor ¶
func (*LoadStreamResponse) Descriptor() ([]byte, []int)
func (*LoadStreamResponse) GetAge ¶
func (m *LoadStreamResponse) GetAge() *google_protobuf.Duration
func (*LoadStreamResponse) GetArchivalKey ¶
func (m *LoadStreamResponse) GetArchivalKey() []byte
func (*LoadStreamResponse) GetDesc ¶
func (m *LoadStreamResponse) GetDesc() []byte
func (*LoadStreamResponse) GetState ¶
func (m *LoadStreamResponse) GetState() *LogStreamState
func (*LoadStreamResponse) ProtoMessage ¶
func (*LoadStreamResponse) ProtoMessage()
func (*LoadStreamResponse) Reset ¶
func (m *LoadStreamResponse) Reset()
func (*LoadStreamResponse) String ¶
func (m *LoadStreamResponse) String() string
type LogStreamState ¶
type LogStreamState struct { // ProtoVersion is the protobuf version for this stream. ProtoVersion string `protobuf:"bytes,1,opt,name=proto_version,json=protoVersion" json:"proto_version,omitempty"` // The log stream's secret. // // Note that the secret is returned! This is okay, since this endpoint is only // accessible to trusted services. The secret can be cached by services to // validate stream information without needing to ping the Coordinator in // between each update. Secret []byte `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"` // The stream index of the log stream's terminal message. If the value is -1, // the log is still streaming. TerminalIndex int64 `protobuf:"varint,3,opt,name=terminal_index,json=terminalIndex" json:"terminal_index,omitempty"` // If the log stream has been archived. Archived bool `protobuf:"varint,4,opt,name=archived" json:"archived,omitempty"` // If the log stream has been purged. Purged bool `protobuf:"varint,5,opt,name=purged" json:"purged,omitempty"` }
LogStreamState is the log stream state value communicated to services.
func (*LogStreamState) Descriptor ¶
func (*LogStreamState) Descriptor() ([]byte, []int)
func (*LogStreamState) GetArchived ¶
func (m *LogStreamState) GetArchived() bool
func (*LogStreamState) GetProtoVersion ¶
func (m *LogStreamState) GetProtoVersion() string
func (*LogStreamState) GetPurged ¶
func (m *LogStreamState) GetPurged() bool
func (*LogStreamState) GetSecret ¶
func (m *LogStreamState) GetSecret() []byte
func (*LogStreamState) GetTerminalIndex ¶
func (m *LogStreamState) GetTerminalIndex() int64
func (*LogStreamState) ProtoMessage ¶
func (*LogStreamState) ProtoMessage()
func (*LogStreamState) Reset ¶
func (m *LogStreamState) Reset()
func (*LogStreamState) String ¶
func (m *LogStreamState) String() string
type RegisterStreamRequest ¶
type RegisterStreamRequest struct { // The log stream's project. Project string `protobuf:"bytes,1,opt,name=project" json:"project,omitempty"` // The log stream's secret. Secret []byte `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"` // The protobuf version string for this stream. ProtoVersion string `protobuf:"bytes,3,opt,name=proto_version,json=protoVersion" json:"proto_version,omitempty"` // The serialized LogStreamDescriptor protobuf for this stream. Desc []byte `protobuf:"bytes,4,opt,name=desc,proto3" json:"desc,omitempty"` // The stream's terminal index. If >= 0, the terminal index will be set // in the registration request, avoiding the need for an additional // termination RPC. TerminalIndex int64 `protobuf:"varint,5,opt,name=terminal_index,json=terminalIndex" json:"terminal_index,omitempty"` }
RegisterStreamRequest is the set of caller-supplied data for the RegisterStream Coordinator service endpoint.
func (*RegisterStreamRequest) Descriptor ¶
func (*RegisterStreamRequest) Descriptor() ([]byte, []int)
func (*RegisterStreamRequest) GetDesc ¶
func (m *RegisterStreamRequest) GetDesc() []byte
func (*RegisterStreamRequest) GetMessageProject ¶
func (ar *RegisterStreamRequest) GetMessageProject() string
GetMessageProject implements ProjectBoundMessage.
func (*RegisterStreamRequest) GetProject ¶
func (m *RegisterStreamRequest) GetProject() string
func (*RegisterStreamRequest) GetProtoVersion ¶
func (m *RegisterStreamRequest) GetProtoVersion() string
func (*RegisterStreamRequest) GetSecret ¶
func (m *RegisterStreamRequest) GetSecret() []byte
func (*RegisterStreamRequest) GetTerminalIndex ¶
func (m *RegisterStreamRequest) GetTerminalIndex() int64
func (*RegisterStreamRequest) ProtoMessage ¶
func (*RegisterStreamRequest) ProtoMessage()
func (*RegisterStreamRequest) Reset ¶
func (m *RegisterStreamRequest) Reset()
func (*RegisterStreamRequest) String ¶
func (m *RegisterStreamRequest) String() string
type RegisterStreamResponse ¶
type RegisterStreamResponse struct { // The Coordinator ID of the log stream. Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` // The state of the requested log stream. State *LogStreamState `protobuf:"bytes,2,opt,name=state" json:"state,omitempty"` }
The response message for the RegisterStream RPC.
func (*RegisterStreamResponse) Descriptor ¶
func (*RegisterStreamResponse) Descriptor() ([]byte, []int)
func (*RegisterStreamResponse) GetId ¶
func (m *RegisterStreamResponse) GetId() string
func (*RegisterStreamResponse) GetState ¶
func (m *RegisterStreamResponse) GetState() *LogStreamState
func (*RegisterStreamResponse) ProtoMessage ¶
func (*RegisterStreamResponse) ProtoMessage()
func (*RegisterStreamResponse) Reset ¶
func (m *RegisterStreamResponse) Reset()
func (*RegisterStreamResponse) String ¶
func (m *RegisterStreamResponse) String() string
type ServicesClient ¶
type ServicesClient interface { // GetConfig allows a service to retrieve the current service configuration // parameters. GetConfig(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*GetConfigResponse, error) // RegisterStream is an idempotent stream state register operation. RegisterStream(ctx context.Context, in *RegisterStreamRequest, opts ...grpc.CallOption) (*RegisterStreamResponse, error) // LoadStream loads the current state of a log stream. LoadStream(ctx context.Context, in *LoadStreamRequest, opts ...grpc.CallOption) (*LoadStreamResponse, error) // TerminateStream is an idempotent operation to update the stream's terminal // index. TerminateStream(ctx context.Context, in *TerminateStreamRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) // ArchiveStream is an idempotent operation to record a log stream's archival // parameters. It is used by the Archivist service upon successful stream // archival. ArchiveStream(ctx context.Context, in *ArchiveStreamRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) }
func NewServicesClient ¶
func NewServicesClient(cc *grpc.ClientConn) ServicesClient
func NewServicesPRPCClient ¶
func NewServicesPRPCClient(client *prpc.Client) ServicesClient
type ServicesServer ¶
type ServicesServer interface { // GetConfig allows a service to retrieve the current service configuration // parameters. GetConfig(context.Context, *google_protobuf1.Empty) (*GetConfigResponse, error) // RegisterStream is an idempotent stream state register operation. RegisterStream(context.Context, *RegisterStreamRequest) (*RegisterStreamResponse, error) // LoadStream loads the current state of a log stream. LoadStream(context.Context, *LoadStreamRequest) (*LoadStreamResponse, error) // TerminateStream is an idempotent operation to update the stream's terminal // index. TerminateStream(context.Context, *TerminateStreamRequest) (*google_protobuf1.Empty, error) // ArchiveStream is an idempotent operation to record a log stream's archival // parameters. It is used by the Archivist service upon successful stream // archival. ArchiveStream(context.Context, *ArchiveStreamRequest) (*google_protobuf1.Empty, error) }
type TerminateStreamRequest ¶
type TerminateStreamRequest struct { // The log stream's project. Project string `protobuf:"bytes,1,opt,name=project" json:"project,omitempty"` // The log stream's path Coordinator ID. Id string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"` // The log stream's secret. Secret []byte `protobuf:"bytes,3,opt,name=secret,proto3" json:"secret,omitempty"` // The terminal index of the stream. TerminalIndex int64 `protobuf:"varint,4,opt,name=terminal_index,json=terminalIndex" json:"terminal_index,omitempty"` }
TerminateStreamRequest is the set of caller-supplied data for the TerminateStream service endpoint.
func (*TerminateStreamRequest) Descriptor ¶
func (*TerminateStreamRequest) Descriptor() ([]byte, []int)
func (*TerminateStreamRequest) GetId ¶
func (m *TerminateStreamRequest) GetId() string
func (*TerminateStreamRequest) GetMessageProject ¶
func (ar *TerminateStreamRequest) GetMessageProject() string
GetMessageProject implements ProjectBoundMessage.
func (*TerminateStreamRequest) GetProject ¶
func (m *TerminateStreamRequest) GetProject() string
func (*TerminateStreamRequest) GetSecret ¶
func (m *TerminateStreamRequest) GetSecret() []byte
func (*TerminateStreamRequest) GetTerminalIndex ¶
func (m *TerminateStreamRequest) GetTerminalIndex() int64
func (*TerminateStreamRequest) ProtoMessage ¶
func (*TerminateStreamRequest) ProtoMessage()
func (*TerminateStreamRequest) Reset ¶
func (m *TerminateStreamRequest) Reset()
func (*TerminateStreamRequest) String ¶
func (m *TerminateStreamRequest) String() string