logdog

package
v0.0.0-...-678bb0e Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package logdog contains Version 1 of the LogDog Coordinator stream registration 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/registration/v1/service.proto

It has these top-level messages:

RegisterPrefixRequest
RegisterPrefixResponse

Index

Constants

This section is empty.

Variables

This section is empty.

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 RegisterRegistrationServer

func RegisterRegistrationServer(s prpc.Registrar, srv RegistrationServer)

Types

type DecoratedRegistration

type DecoratedRegistration struct {
	// Service is the service to decorate.
	Service RegistrationServer
	// 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 (*DecoratedRegistration) RegisterPrefix

type RegisterPrefixRequest

type RegisterPrefixRequest struct {
	// The log stream's project.
	Project string `protobuf:"bytes,1,opt,name=project" json:"project,omitempty"`
	// The log stream prefix to register.
	Prefix string `protobuf:"bytes,2,opt,name=prefix" json:"prefix,omitempty"`
	// Optional information about the registering agent.
	SourceInfo []string `protobuf:"bytes,3,rep,name=source_info,json=sourceInfo" json:"source_info,omitempty"`
	// The prefix expiration time. If <= 0, the project's default prefix
	// expiration period will be applied.
	//
	// The prefix will be closed by the Coordinator after its expiration period.
	// Once closed, new stream registration requests will no longer be accepted.
	//
	// If supplied, this value should exceed the timeout of the local task, else
	// some of the task's streams may be dropped due to failing registration.
	Expiration *google_protobuf.Duration `protobuf:"bytes,10,opt,name=expiration" json:"expiration,omitempty"`
}

RegisterPrefixRequest registers a new Prefix with the Coordinator.

func (*RegisterPrefixRequest) Descriptor

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

func (*RegisterPrefixRequest) GetExpiration

func (m *RegisterPrefixRequest) GetExpiration() *google_protobuf.Duration

func (*RegisterPrefixRequest) GetMessageProject

func (req *RegisterPrefixRequest) GetMessageProject() string

GetMessageProject implements ProjectBoundMessage.

func (*RegisterPrefixRequest) GetPrefix

func (m *RegisterPrefixRequest) GetPrefix() string

func (*RegisterPrefixRequest) GetProject

func (m *RegisterPrefixRequest) GetProject() string

func (*RegisterPrefixRequest) GetSourceInfo

func (m *RegisterPrefixRequest) GetSourceInfo() []string

func (*RegisterPrefixRequest) ProtoMessage

func (*RegisterPrefixRequest) ProtoMessage()

func (*RegisterPrefixRequest) Reset

func (m *RegisterPrefixRequest) Reset()

func (*RegisterPrefixRequest) String

func (m *RegisterPrefixRequest) String() string

type RegisterPrefixResponse

type RegisterPrefixResponse struct {
	// Secret is the prefix's secret. This must be included verbatim in Butler
	// bundles to assert ownership of this prefix.
	Secret []byte `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"`
	// The name of the Pub/Sub topic to publish butlerproto-formatted Butler log
	// bundles to.
	LogBundleTopic string `protobuf:"bytes,2,opt,name=log_bundle_topic,json=logBundleTopic" json:"log_bundle_topic,omitempty"`
}

The response message for the RegisterPrefix RPC.

func (*RegisterPrefixResponse) Descriptor

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

func (*RegisterPrefixResponse) GetLogBundleTopic

func (m *RegisterPrefixResponse) GetLogBundleTopic() string

func (*RegisterPrefixResponse) GetSecret

func (m *RegisterPrefixResponse) GetSecret() []byte

func (*RegisterPrefixResponse) ProtoMessage

func (*RegisterPrefixResponse) ProtoMessage()

func (*RegisterPrefixResponse) Reset

func (m *RegisterPrefixResponse) Reset()

func (*RegisterPrefixResponse) String

func (m *RegisterPrefixResponse) String() string

type RegistrationClient

type RegistrationClient interface {
	// RegisterStream allows a Butler instance to register a log stream with the
	// Coordinator. Upon success, the Coordinator will return registration
	// information and streaming parameters to the Butler.
	//
	// This should be called by a Butler instance to gain the ability to publish
	// to a prefix space. The caller must have WRITE access to its project's
	// stream space. If WRITE access is not present, this will fail with the
	// "PermissionDenied" gRPC code.
	//
	// A stream prefix may be registered at most once. Additional registration
	// requests will fail with the "AlreadyExists" gRPC code.
	RegisterPrefix(ctx context.Context, in *RegisterPrefixRequest, opts ...grpc.CallOption) (*RegisterPrefixResponse, error)
}

func NewRegistrationClient

func NewRegistrationClient(cc *grpc.ClientConn) RegistrationClient

func NewRegistrationPRPCClient

func NewRegistrationPRPCClient(client *prpc.Client) RegistrationClient

type RegistrationServer

type RegistrationServer interface {
	// RegisterStream allows a Butler instance to register a log stream with the
	// Coordinator. Upon success, the Coordinator will return registration
	// information and streaming parameters to the Butler.
	//
	// This should be called by a Butler instance to gain the ability to publish
	// to a prefix space. The caller must have WRITE access to its project's
	// stream space. If WRITE access is not present, this will fail with the
	// "PermissionDenied" gRPC code.
	//
	// A stream prefix may be registered at most once. Additional registration
	// requests will fail with the "AlreadyExists" gRPC code.
	RegisterPrefix(context.Context, *RegisterPrefixRequest) (*RegisterPrefixResponse, error)
}

Jump to

Keyboard shortcuts

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