Back to godoc.org

Package logdog

v0.0.0-...-1557bcf
Latest Go to latest

The latest major version is .

Published: Aug 13, 2020 | License: Apache-2.0 | Module: github.com/luci/luci-go

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.

Index

Variables

var File_go_chromium_org_luci_logdog_api_endpoints_coordinator_services_v1_service_proto protoreflect.FileDescriptor
var File_go_chromium_org_luci_logdog_api_endpoints_coordinator_services_v1_state_proto protoreflect.FileDescriptor
var File_go_chromium_org_luci_logdog_api_endpoints_coordinator_services_v1_tasks_proto protoreflect.FileDescriptor

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)

type ArchiveStreamRequest

type ArchiveStreamRequest struct {

	// The log stream's project.
	Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"`
	// The Coordinator ID of the log stream that was archived.
	Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// The number of log entries that were archived.
	LogEntryCount int64 `protobuf:"varint,3,opt,name=log_entry_count,json=logEntryCount,proto3" json:"log_entry_count,omitempty"`
	// The highest log stream index that was archived.
	TerminalIndex int64 `protobuf:"varint,4,opt,name=terminal_index,json=terminalIndex,proto3" json:"terminal_index,omitempty"`
	// If not empty, there was an archival error.
	//
	// This field serves to indicate that an error occurred (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,proto3" json:"error,omitempty"`
	// The archive URL of the log stream's stream data.
	StreamUrl string `protobuf:"bytes,10,opt,name=stream_url,json=streamUrl,proto3" json:"stream_url,omitempty"`
	// The size of the log stream's stream data.
	StreamSize int64 `protobuf:"varint,11,opt,name=stream_size,json=streamSize,proto3" 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,proto3" json:"index_url,omitempty"`
	// The size of the log stream's index data.
	IndexSize int64 `protobuf:"varint,21,opt,name=index_size,json=indexSize,proto3" json:"index_size,omitempty"`
	// contains filtered or unexported fields
}

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)

Deprecated: Use ArchiveStreamRequest.ProtoReflect.Descriptor instead.

func (*ArchiveStreamRequest) GetError

func (x *ArchiveStreamRequest) GetError() string

func (*ArchiveStreamRequest) GetId

func (x *ArchiveStreamRequest) GetId() string

func (*ArchiveStreamRequest) GetIndexSize

func (x *ArchiveStreamRequest) GetIndexSize() int64

func (*ArchiveStreamRequest) GetIndexUrl

func (x *ArchiveStreamRequest) GetIndexUrl() string

func (*ArchiveStreamRequest) GetLogEntryCount

func (x *ArchiveStreamRequest) GetLogEntryCount() int64

func (*ArchiveStreamRequest) GetMessageProject

func (ar *ArchiveStreamRequest) GetMessageProject() string

GetMessageProject implements ProjectBoundMessage.

func (*ArchiveStreamRequest) GetProject

func (x *ArchiveStreamRequest) GetProject() string

func (*ArchiveStreamRequest) GetStreamSize

func (x *ArchiveStreamRequest) GetStreamSize() int64

func (*ArchiveStreamRequest) GetStreamUrl

func (x *ArchiveStreamRequest) GetStreamUrl() string

func (*ArchiveStreamRequest) GetTerminalIndex

func (x *ArchiveStreamRequest) GetTerminalIndex() int64

func (*ArchiveStreamRequest) ProtoMessage

func (*ArchiveStreamRequest) ProtoMessage()

func (*ArchiveStreamRequest) ProtoReflect

func (x *ArchiveStreamRequest) ProtoReflect() protoreflect.Message

func (*ArchiveStreamRequest) Reset

func (x *ArchiveStreamRequest) Reset()

func (*ArchiveStreamRequest) String

func (x *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,proto3" json:"project,omitempty"`
	// The hash ID of the log stream to archive.
	Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// The TaskQueue Name of this task, used in the taskqueue pipeline.
	// This is required for ACKing.
	TaskName string `protobuf:"bytes,7,opt,name=task_name,json=taskName,proto3" json:"task_name,omitempty"`
	// TODO(hinoka): Remove this after crbug.com/923557
	// 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"`
	// contains filtered or unexported fields
}

ArchiveTask is a task queue task description for the archival of a single log stream.

func (*ArchiveTask) Descriptor

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

Deprecated: Use ArchiveTask.ProtoReflect.Descriptor instead.

func (*ArchiveTask) GetId

func (x *ArchiveTask) GetId() string

func (*ArchiveTask) GetKey

func (x *ArchiveTask) GetKey() []byte

func (*ArchiveTask) GetProject

func (x *ArchiveTask) GetProject() string

func (*ArchiveTask) GetTaskName

func (x *ArchiveTask) GetTaskName() string

func (*ArchiveTask) ProtoMessage

func (*ArchiveTask) ProtoMessage()

func (*ArchiveTask) ProtoReflect

func (x *ArchiveTask) ProtoReflect() protoreflect.Message

func (*ArchiveTask) Reset

func (x *ArchiveTask) Reset()

func (*ArchiveTask) String

func (x *ArchiveTask) String() string

type BatchRequest

type BatchRequest struct {
	Req []*BatchRequest_Entry `protobuf:"bytes,1,rep,name=req,proto3" json:"req,omitempty"`
	// contains filtered or unexported fields
}

BatchRequest is a batch of individual requests to make to the Coordinator.

func (*BatchRequest) Descriptor

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

Deprecated: Use BatchRequest.ProtoReflect.Descriptor instead.

func (*BatchRequest) GetReq

func (x *BatchRequest) GetReq() []*BatchRequest_Entry

func (*BatchRequest) ProtoMessage

func (*BatchRequest) ProtoMessage()

func (*BatchRequest) ProtoReflect

func (x *BatchRequest) ProtoReflect() protoreflect.Message

func (*BatchRequest) Reset

func (x *BatchRequest) Reset()

func (*BatchRequest) String

func (x *BatchRequest) String() string

type BatchRequest_Entry

type BatchRequest_Entry struct {

	// Types that are assignable to Value:
	//	*BatchRequest_Entry_RegisterStream
	//	*BatchRequest_Entry_LoadStream
	//	*BatchRequest_Entry_TerminateStream
	//	*BatchRequest_Entry_ArchiveStream
	Value isBatchRequest_Entry_Value `protobuf_oneof:"value"`
	// contains filtered or unexported fields
}

The collection of batched requests.

func (*BatchRequest_Entry) Descriptor

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

Deprecated: Use BatchRequest_Entry.ProtoReflect.Descriptor instead.

func (*BatchRequest_Entry) GetArchiveStream

func (x *BatchRequest_Entry) GetArchiveStream() *ArchiveStreamRequest

func (*BatchRequest_Entry) GetLoadStream

func (x *BatchRequest_Entry) GetLoadStream() *LoadStreamRequest

func (*BatchRequest_Entry) GetRegisterStream

func (x *BatchRequest_Entry) GetRegisterStream() *RegisterStreamRequest

func (*BatchRequest_Entry) GetTerminateStream

func (x *BatchRequest_Entry) GetTerminateStream() *TerminateStreamRequest

func (*BatchRequest_Entry) GetValue

func (m *BatchRequest_Entry) GetValue() isBatchRequest_Entry_Value

func (*BatchRequest_Entry) ProtoMessage

func (*BatchRequest_Entry) ProtoMessage()

func (*BatchRequest_Entry) ProtoReflect

func (x *BatchRequest_Entry) ProtoReflect() protoreflect.Message

func (*BatchRequest_Entry) Reset

func (x *BatchRequest_Entry) Reset()

func (*BatchRequest_Entry) String

func (x *BatchRequest_Entry) String() string

type BatchRequest_Entry_ArchiveStream

type BatchRequest_Entry_ArchiveStream struct {
	ArchiveStream *ArchiveStreamRequest `protobuf:"bytes,4,opt,name=archive_stream,json=archiveStream,proto3,oneof"`
}

type BatchRequest_Entry_LoadStream

type BatchRequest_Entry_LoadStream struct {
	LoadStream *LoadStreamRequest `protobuf:"bytes,2,opt,name=load_stream,json=loadStream,proto3,oneof"`
}

type BatchRequest_Entry_RegisterStream

type BatchRequest_Entry_RegisterStream struct {
	RegisterStream *RegisterStreamRequest `protobuf:"bytes,1,opt,name=register_stream,json=registerStream,proto3,oneof"`
}

type BatchRequest_Entry_TerminateStream

type BatchRequest_Entry_TerminateStream struct {
	TerminateStream *TerminateStreamRequest `protobuf:"bytes,3,opt,name=terminate_stream,json=terminateStream,proto3,oneof"`
}

type BatchResponse

type BatchResponse struct {
	Resp []*BatchResponse_Entry `protobuf:"bytes,1,rep,name=resp,proto3" json:"resp,omitempty"`
	// contains filtered or unexported fields
}

BatchResponse is a response to a BatchRequest.

func (*BatchResponse) Descriptor

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

Deprecated: Use BatchResponse.ProtoReflect.Descriptor instead.

func (*BatchResponse) GetResp

func (x *BatchResponse) GetResp() []*BatchResponse_Entry

func (*BatchResponse) ProtoMessage

func (*BatchResponse) ProtoMessage()

func (*BatchResponse) ProtoReflect

func (x *BatchResponse) ProtoReflect() protoreflect.Message

func (*BatchResponse) Reset

func (x *BatchResponse) Reset()

func (*BatchResponse) String

func (x *BatchResponse) String() string

type BatchResponse_Entry

type BatchResponse_Entry struct {

	// The index in the BatchRequest for this entry.
	Index int32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
	// Types that are assignable to Value:
	//	*BatchResponse_Entry_Err
	//	*BatchResponse_Entry_RegisterStream
	//	*BatchResponse_Entry_LoadStream
	Value isBatchResponse_Entry_Value `protobuf_oneof:"value"`
	// contains filtered or unexported fields
}

The collection of batched requests.

Each entry corresponds to the BatchRequest entry with the specified index.

Entry objects may appear out of order with their request indexes. Some responses may also be missing, if the remote end could not provide them due to constraints (e.g., size, time).

func (*BatchResponse_Entry) Descriptor

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

Deprecated: Use BatchResponse_Entry.ProtoReflect.Descriptor instead.

func (*BatchResponse_Entry) GetErr

func (x *BatchResponse_Entry) GetErr() *Error

func (*BatchResponse_Entry) GetIndex

func (x *BatchResponse_Entry) GetIndex() int32

func (*BatchResponse_Entry) GetLoadStream

func (x *BatchResponse_Entry) GetLoadStream() *LoadStreamResponse

func (*BatchResponse_Entry) GetRegisterStream

func (x *BatchResponse_Entry) GetRegisterStream() *RegisterStreamResponse

func (*BatchResponse_Entry) GetValue

func (m *BatchResponse_Entry) GetValue() isBatchResponse_Entry_Value

func (*BatchResponse_Entry) ProtoMessage

func (*BatchResponse_Entry) ProtoMessage()

func (*BatchResponse_Entry) ProtoReflect

func (x *BatchResponse_Entry) ProtoReflect() protoreflect.Message

func (*BatchResponse_Entry) Reset

func (x *BatchResponse_Entry) Reset()

func (*BatchResponse_Entry) String

func (x *BatchResponse_Entry) String() string

type BatchResponse_Entry_Err

type BatchResponse_Entry_Err struct {
	Err *Error `protobuf:"bytes,2,opt,name=err,proto3,oneof"`
}

type BatchResponse_Entry_LoadStream

type BatchResponse_Entry_LoadStream struct {
	LoadStream *LoadStreamResponse `protobuf:"bytes,4,opt,name=load_stream,json=loadStream,proto3,oneof"`
}

type BatchResponse_Entry_RegisterStream

type BatchResponse_Entry_RegisterStream struct {
	RegisterStream *RegisterStreamResponse `protobuf:"bytes,3,opt,name=register_stream,json=registerStream,proto3,oneof"`
}

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(ctx 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(ctx context.Context, methodName string, rsp proto.Message, err error) error
}

func (*DecoratedServices) ArchiveStream

func (s *DecoratedServices) ArchiveStream(ctx context.Context, req *ArchiveStreamRequest) (rsp *empty.Empty, err error)

func (*DecoratedServices) Batch

func (s *DecoratedServices) Batch(ctx context.Context, req *BatchRequest) (rsp *BatchResponse, err error)

func (*DecoratedServices) DeleteArchiveTasks

func (s *DecoratedServices) DeleteArchiveTasks(ctx context.Context, req *DeleteRequest) (rsp *empty.Empty, err error)

func (*DecoratedServices) LeaseArchiveTasks

func (s *DecoratedServices) LeaseArchiveTasks(ctx context.Context, req *LeaseRequest) (rsp *LeaseResponse, err error)

func (*DecoratedServices) LoadStream

func (s *DecoratedServices) LoadStream(ctx context.Context, req *LoadStreamRequest) (rsp *LoadStreamResponse, err error)

func (*DecoratedServices) RegisterStream

func (s *DecoratedServices) RegisterStream(ctx context.Context, req *RegisterStreamRequest) (rsp *RegisterStreamResponse, err error)

func (*DecoratedServices) TerminateStream

func (s *DecoratedServices) TerminateStream(ctx context.Context, req *TerminateStreamRequest) (rsp *empty.Empty, err error)

type DeleteRequest

type DeleteRequest struct {

	// Tasks are tasks the caller wants to delete.  Only Project and Id are required.
	Tasks []*ArchiveTask `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteRequest) Descriptor

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

Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.

func (*DeleteRequest) GetTasks

func (x *DeleteRequest) GetTasks() []*ArchiveTask

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) ProtoReflect

func (x *DeleteRequest) ProtoReflect() protoreflect.Message

func (*DeleteRequest) Reset

func (x *DeleteRequest) Reset()

func (*DeleteRequest) String

func (x *DeleteRequest) String() string

type Error

type Error struct {

	// The gRPC code for this error.
	GrpcCode int32 `protobuf:"varint,1,opt,name=grpc_code,json=grpcCode,proto3" json:"grpc_code,omitempty"`
	// Transient is true if this is a transient error.
	Transient bool `protobuf:"varint,2,opt,name=transient,proto3" json:"transient,omitempty"`
	// An optional associated message.
	Msg string `protobuf:"bytes,3,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

Error is a projection of a gRPC error.

NOTE: This and its helper functions may be useful more generally. Maybe transplant this to a more general place such as "//grpc" if it ends up being useful.

func MakeError

func MakeError(err error) *Error

MakeError returns an Error object for err. If err is a wrapped gRPC error, its code will be extracted and embedded in the returned Error.

The Msg field will not be populated.

func (*Error) Descriptor

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

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) GetGrpcCode

func (x *Error) GetGrpcCode() int32

func (*Error) GetMsg

func (x *Error) GetMsg() string

func (*Error) GetTransient

func (x *Error) GetTransient() bool

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect

func (x *Error) ProtoReflect() protoreflect.Message

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string

func (*Error) ToError

func (e *Error) ToError() error

ToError converts an Error into a gRPC error. If e is nil, a nil error will be returned.

type LeaseRequest

type LeaseRequest struct {
	MaxTasks  int64              `protobuf:"varint,1,opt,name=max_tasks,json=maxTasks,proto3" json:"max_tasks,omitempty"`
	LeaseTime *duration.Duration `protobuf:"bytes,2,opt,name=lease_time,json=leaseTime,proto3" json:"lease_time,omitempty"`
	// contains filtered or unexported fields
}

func (*LeaseRequest) Descriptor

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

Deprecated: Use LeaseRequest.ProtoReflect.Descriptor instead.

func (*LeaseRequest) GetLeaseTime

func (x *LeaseRequest) GetLeaseTime() *duration.Duration

func (*LeaseRequest) GetMaxTasks

func (x *LeaseRequest) GetMaxTasks() int64

func (*LeaseRequest) ProtoMessage

func (*LeaseRequest) ProtoMessage()

func (*LeaseRequest) ProtoReflect

func (x *LeaseRequest) ProtoReflect() protoreflect.Message

func (*LeaseRequest) Reset

func (x *LeaseRequest) Reset()

func (*LeaseRequest) String

func (x *LeaseRequest) String() string

type LeaseResponse

type LeaseResponse struct {

	// Tasks are tasks leased to the caller.  Only Project and Id are filled.
	Tasks []*ArchiveTask `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"`
	// contains filtered or unexported fields
}

func (*LeaseResponse) Descriptor

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

Deprecated: Use LeaseResponse.ProtoReflect.Descriptor instead.

func (*LeaseResponse) GetTasks

func (x *LeaseResponse) GetTasks() []*ArchiveTask

func (*LeaseResponse) ProtoMessage

func (*LeaseResponse) ProtoMessage()

func (*LeaseResponse) ProtoReflect

func (x *LeaseResponse) ProtoReflect() protoreflect.Message

func (*LeaseResponse) Reset

func (x *LeaseResponse) Reset()

func (*LeaseResponse) String

func (x *LeaseResponse) String() string

type LoadStreamRequest

type LoadStreamRequest struct {

	// The log stream's project.
	Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"`
	// The log stream's path Coordinator ID.
	Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// If true, include the log stream descriptor.
	Desc bool `protobuf:"varint,3,opt,name=desc,proto3" json:"desc,omitempty"`
	// contains filtered or unexported fields
}

LoadStreamRequest loads the current state of a log stream.

func (*LoadStreamRequest) Descriptor

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

Deprecated: Use LoadStreamRequest.ProtoReflect.Descriptor instead.

func (*LoadStreamRequest) GetDesc

func (x *LoadStreamRequest) GetDesc() bool

func (*LoadStreamRequest) GetId

func (x *LoadStreamRequest) GetId() string

func (*LoadStreamRequest) GetMessageProject

func (ar *LoadStreamRequest) GetMessageProject() string

GetMessageProject implements ProjectBoundMessage.

func (*LoadStreamRequest) GetProject

func (x *LoadStreamRequest) GetProject() string

func (*LoadStreamRequest) ProtoMessage

func (*LoadStreamRequest) ProtoMessage()

func (*LoadStreamRequest) ProtoReflect

func (x *LoadStreamRequest) ProtoReflect() protoreflect.Message

func (*LoadStreamRequest) Reset

func (x *LoadStreamRequest) Reset()

func (*LoadStreamRequest) String

func (x *LoadStreamRequest) String() string

type LoadStreamResponse

type LoadStreamResponse struct {

	// The state of the requested log stream.
	State *LogStreamState `protobuf:"bytes,1,opt,name=state,proto3" 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 *duration.Duration `protobuf:"bytes,3,opt,name=age,proto3" 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"`
	// contains filtered or unexported fields
}

The response message for the LoadStream RPC.

func (*LoadStreamResponse) Descriptor

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

Deprecated: Use LoadStreamResponse.ProtoReflect.Descriptor instead.

func (*LoadStreamResponse) GetAge

func (x *LoadStreamResponse) GetAge() *duration.Duration

func (*LoadStreamResponse) GetArchivalKey

func (x *LoadStreamResponse) GetArchivalKey() []byte

func (*LoadStreamResponse) GetDesc

func (x *LoadStreamResponse) GetDesc() []byte

func (*LoadStreamResponse) GetState

func (x *LoadStreamResponse) GetState() *LogStreamState

func (*LoadStreamResponse) ProtoMessage

func (*LoadStreamResponse) ProtoMessage()

func (*LoadStreamResponse) ProtoReflect

func (x *LoadStreamResponse) ProtoReflect() protoreflect.Message

func (*LoadStreamResponse) Reset

func (x *LoadStreamResponse) Reset()

func (*LoadStreamResponse) String

func (x *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,proto3" 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,proto3" json:"terminal_index,omitempty"`
	// If the log stream has been archived.
	Archived bool `protobuf:"varint,4,opt,name=archived,proto3" json:"archived,omitempty"`
	// If the log stream has been purged.
	Purged bool `protobuf:"varint,5,opt,name=purged,proto3" json:"purged,omitempty"`
	// contains filtered or unexported fields
}

LogStreamState is the log stream state value communicated to services.

func (*LogStreamState) Descriptor

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

Deprecated: Use LogStreamState.ProtoReflect.Descriptor instead.

func (*LogStreamState) GetArchived

func (x *LogStreamState) GetArchived() bool

func (*LogStreamState) GetProtoVersion

func (x *LogStreamState) GetProtoVersion() string

func (*LogStreamState) GetPurged

func (x *LogStreamState) GetPurged() bool

func (*LogStreamState) GetSecret

func (x *LogStreamState) GetSecret() []byte

func (*LogStreamState) GetTerminalIndex

func (x *LogStreamState) GetTerminalIndex() int64

func (*LogStreamState) ProtoMessage

func (*LogStreamState) ProtoMessage()

func (*LogStreamState) ProtoReflect

func (x *LogStreamState) ProtoReflect() protoreflect.Message

func (*LogStreamState) Reset

func (x *LogStreamState) Reset()

func (*LogStreamState) String

func (x *LogStreamState) String() string

type RegisterStreamRequest

type RegisterStreamRequest struct {

	// The log stream's project.
	Project string `protobuf:"bytes,1,opt,name=project,proto3" 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,proto3" 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,proto3" json:"terminal_index,omitempty"`
	// contains filtered or unexported fields
}

RegisterStreamRequest is the set of caller-supplied data for the RegisterStream Coordinator service endpoint.

func (*RegisterStreamRequest) Descriptor

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

Deprecated: Use RegisterStreamRequest.ProtoReflect.Descriptor instead.

func (*RegisterStreamRequest) GetDesc

func (x *RegisterStreamRequest) GetDesc() []byte

func (*RegisterStreamRequest) GetMessageProject

func (ar *RegisterStreamRequest) GetMessageProject() string

GetMessageProject implements ProjectBoundMessage.

func (*RegisterStreamRequest) GetProject

func (x *RegisterStreamRequest) GetProject() string

func (*RegisterStreamRequest) GetProtoVersion

func (x *RegisterStreamRequest) GetProtoVersion() string

func (*RegisterStreamRequest) GetSecret

func (x *RegisterStreamRequest) GetSecret() []byte

func (*RegisterStreamRequest) GetTerminalIndex

func (x *RegisterStreamRequest) GetTerminalIndex() int64

func (*RegisterStreamRequest) ProtoMessage

func (*RegisterStreamRequest) ProtoMessage()

func (*RegisterStreamRequest) ProtoReflect

func (x *RegisterStreamRequest) ProtoReflect() protoreflect.Message

func (*RegisterStreamRequest) Reset

func (x *RegisterStreamRequest) Reset()

func (*RegisterStreamRequest) String

func (x *RegisterStreamRequest) String() string

type RegisterStreamResponse

type RegisterStreamResponse struct {

	// The Coordinator ID of the log stream.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The state of the requested log stream.
	State *LogStreamState `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"`
	// Error is the error response.
	Error *Error `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

The response message for the RegisterStream RPC.

func (*RegisterStreamResponse) Descriptor

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

Deprecated: Use RegisterStreamResponse.ProtoReflect.Descriptor instead.

func (*RegisterStreamResponse) GetError

func (x *RegisterStreamResponse) GetError() *Error

func (*RegisterStreamResponse) GetId

func (x *RegisterStreamResponse) GetId() string

func (*RegisterStreamResponse) GetState

func (x *RegisterStreamResponse) GetState() *LogStreamState

func (*RegisterStreamResponse) ProtoMessage

func (*RegisterStreamResponse) ProtoMessage()

func (*RegisterStreamResponse) ProtoReflect

func (x *RegisterStreamResponse) ProtoReflect() protoreflect.Message

func (*RegisterStreamResponse) Reset

func (x *RegisterStreamResponse) Reset()

func (*RegisterStreamResponse) String

func (x *RegisterStreamResponse) String() string

type ServicesClient

type ServicesClient interface {
	// 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) (*empty.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) (*empty.Empty, error)
	// Batch is a series of requests submitted in batch. It returns a
	// BatchResponse containing the same number of entries, with each entry index
	// corresponding to its request index.
	Batch(ctx context.Context, in *BatchRequest, opts ...grpc.CallOption) (*BatchResponse, error)
	// TaskQueueLease is a passthrough to appengine's taskqueue.Lease.
	// TODO(hinoka): Remove this when https://cloud.google.com/tasks/ is out of Beta.
	LeaseArchiveTasks(ctx context.Context, in *LeaseRequest, opts ...grpc.CallOption) (*LeaseResponse, error)
	// TaskQueueDeleteMulti is a passthrough to appengine's taskqueue.DeleteMulti
	// TODO(hinoka): Remove this when https://cloud.google.com/tasks/ is out of Beta.
	DeleteArchiveTasks(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*empty.Empty, error)
}

ServicesClient is the client API for Services service.

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

func NewServicesPRPCClient

func NewServicesPRPCClient(client *prpc.Client) ServicesClient

type ServicesServer

type ServicesServer interface {
	// 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) (*empty.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) (*empty.Empty, error)
	// Batch is a series of requests submitted in batch. It returns a
	// BatchResponse containing the same number of entries, with each entry index
	// corresponding to its request index.
	Batch(context.Context, *BatchRequest) (*BatchResponse, error)
	// TaskQueueLease is a passthrough to appengine's taskqueue.Lease.
	// TODO(hinoka): Remove this when https://cloud.google.com/tasks/ is out of Beta.
	LeaseArchiveTasks(context.Context, *LeaseRequest) (*LeaseResponse, error)
	// TaskQueueDeleteMulti is a passthrough to appengine's taskqueue.DeleteMulti
	// TODO(hinoka): Remove this when https://cloud.google.com/tasks/ is out of Beta.
	DeleteArchiveTasks(context.Context, *DeleteRequest) (*empty.Empty, error)
}

ServicesServer is the server API for Services service.

type TerminateStreamRequest

type TerminateStreamRequest struct {

	// The log stream's project.
	Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"`
	// The log stream's path Coordinator ID.
	Id string `protobuf:"bytes,2,opt,name=id,proto3" 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,proto3" json:"terminal_index,omitempty"`
	// contains filtered or unexported fields
}

TerminateStreamRequest is the set of caller-supplied data for the TerminateStream service endpoint.

func (*TerminateStreamRequest) Descriptor

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

Deprecated: Use TerminateStreamRequest.ProtoReflect.Descriptor instead.

func (*TerminateStreamRequest) GetId

func (x *TerminateStreamRequest) GetId() string

func (*TerminateStreamRequest) GetMessageProject

func (ar *TerminateStreamRequest) GetMessageProject() string

GetMessageProject implements ProjectBoundMessage.

func (*TerminateStreamRequest) GetProject

func (x *TerminateStreamRequest) GetProject() string

func (*TerminateStreamRequest) GetSecret

func (x *TerminateStreamRequest) GetSecret() []byte

func (*TerminateStreamRequest) GetTerminalIndex

func (x *TerminateStreamRequest) GetTerminalIndex() int64

func (*TerminateStreamRequest) ProtoMessage

func (*TerminateStreamRequest) ProtoMessage()

func (*TerminateStreamRequest) ProtoReflect

func (x *TerminateStreamRequest) ProtoReflect() protoreflect.Message

func (*TerminateStreamRequest) Reset

func (x *TerminateStreamRequest) Reset()

func (*TerminateStreamRequest) String

func (x *TerminateStreamRequest) String() string

type UnimplementedServicesServer

type UnimplementedServicesServer struct {
}

UnimplementedServicesServer can be embedded to have forward compatible implementations.

func (*UnimplementedServicesServer) ArchiveStream

func (*UnimplementedServicesServer) ArchiveStream(context.Context, *ArchiveStreamRequest) (*empty.Empty, error)

func (*UnimplementedServicesServer) Batch

func (*UnimplementedServicesServer) Batch(context.Context, *BatchRequest) (*BatchResponse, error)

func (*UnimplementedServicesServer) DeleteArchiveTasks

func (*UnimplementedServicesServer) DeleteArchiveTasks(context.Context, *DeleteRequest) (*empty.Empty, error)

func (*UnimplementedServicesServer) LeaseArchiveTasks

func (*UnimplementedServicesServer) LeaseArchiveTasks(context.Context, *LeaseRequest) (*LeaseResponse, error)

func (*UnimplementedServicesServer) LoadStream

func (*UnimplementedServicesServer) LoadStream(context.Context, *LoadStreamRequest) (*LoadStreamResponse, error)

func (*UnimplementedServicesServer) RegisterStream

func (*UnimplementedServicesServer) RegisterStream(context.Context, *RegisterStreamRequest) (*RegisterStreamResponse, error)

func (*UnimplementedServicesServer) TerminateStream

func (*UnimplementedServicesServer) TerminateStream(context.Context, *TerminateStreamRequest) (*empty.Empty, error)

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier