luci: go.chromium.org/luci/logdog/api/endpoints/coordinator/registration/v1 Index | Files

package logdog

import "go.chromium.org/luci/logdog/api/endpoints/coordinator/registration/v1"

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.

Index

Package Files

gen.go pb.discovery.go registrationserver_dec.go service.pb.go util.go

func FileDescriptorSet Uses

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 Uses

func RegisterRegistrationServer(s prpc.Registrar, srv RegistrationServer)

type DecoratedRegistration Uses

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 Uses

func (s *DecoratedRegistration) RegisterPrefix(c context.Context, req *RegisterPrefixRequest) (rsp *RegisterPrefixResponse, err error)

type RegisterPrefixRequest Uses

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"`
    // Optional nonce to allow retries of this RPC. ALL CLIENTS SHOULD PROVIDE
    // THIS. The client should generate the nonce once while preparing the request
    // message, and then re-use the same nonce for retries of the request.
    //
    // The nonce should be 32 bytes of random data.
    // The nonce must not be reused between different requests (only for retries
    //   of the same request).
    //
    // NOTE: This is currently optional, but once all clients have upgraded to
    // this scheme, it will become mandatory. During the transition if this is
    // omitted, then NO RETRIES will be allowed for this request, if the server
    // processes it correctly but the client fails to get the response from the
    // server.
    OpNonce []byte `protobuf:"bytes,4,opt,name=op_nonce,json=opNonce,proto3" json:"op_nonce,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           *duration.Duration `protobuf:"bytes,10,opt,name=expiration" json:"expiration,omitempty"`
    XXX_NoUnkeyedLiteral struct{}           `json:"-"`
    XXX_unrecognized     []byte             `json:"-"`
    XXX_sizecache        int32              `json:"-"`
}

RegisterPrefixRequest registers a new Prefix with the Coordinator.

func (*RegisterPrefixRequest) Descriptor Uses

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

func (*RegisterPrefixRequest) GetExpiration Uses

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

func (*RegisterPrefixRequest) GetMessageProject Uses

func (req *RegisterPrefixRequest) GetMessageProject() string

GetMessageProject implements ProjectBoundMessage.

func (*RegisterPrefixRequest) GetOpNonce Uses

func (m *RegisterPrefixRequest) GetOpNonce() []byte

func (*RegisterPrefixRequest) GetPrefix Uses

func (m *RegisterPrefixRequest) GetPrefix() string

func (*RegisterPrefixRequest) GetProject Uses

func (m *RegisterPrefixRequest) GetProject() string

func (*RegisterPrefixRequest) GetSourceInfo Uses

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

func (*RegisterPrefixRequest) ProtoMessage Uses

func (*RegisterPrefixRequest) ProtoMessage()

func (*RegisterPrefixRequest) Reset Uses

func (m *RegisterPrefixRequest) Reset()

func (*RegisterPrefixRequest) String Uses

func (m *RegisterPrefixRequest) String() string

func (*RegisterPrefixRequest) XXX_DiscardUnknown Uses

func (m *RegisterPrefixRequest) XXX_DiscardUnknown()

func (*RegisterPrefixRequest) XXX_Marshal Uses

func (m *RegisterPrefixRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RegisterPrefixRequest) XXX_Merge Uses

func (dst *RegisterPrefixRequest) XXX_Merge(src proto.Message)

func (*RegisterPrefixRequest) XXX_Size Uses

func (m *RegisterPrefixRequest) XXX_Size() int

func (*RegisterPrefixRequest) XXX_Unmarshal Uses

func (m *RegisterPrefixRequest) XXX_Unmarshal(b []byte) error

type RegisterPrefixResponse Uses

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"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

The response message for the RegisterPrefix RPC.

func (*RegisterPrefixResponse) Descriptor Uses

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

func (*RegisterPrefixResponse) GetLogBundleTopic Uses

func (m *RegisterPrefixResponse) GetLogBundleTopic() string

func (*RegisterPrefixResponse) GetSecret Uses

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

func (*RegisterPrefixResponse) ProtoMessage Uses

func (*RegisterPrefixResponse) ProtoMessage()

func (*RegisterPrefixResponse) Reset Uses

func (m *RegisterPrefixResponse) Reset()

func (*RegisterPrefixResponse) String Uses

func (m *RegisterPrefixResponse) String() string

func (*RegisterPrefixResponse) XXX_DiscardUnknown Uses

func (m *RegisterPrefixResponse) XXX_DiscardUnknown()

func (*RegisterPrefixResponse) XXX_Marshal Uses

func (m *RegisterPrefixResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RegisterPrefixResponse) XXX_Merge Uses

func (dst *RegisterPrefixResponse) XXX_Merge(src proto.Message)

func (*RegisterPrefixResponse) XXX_Size Uses

func (m *RegisterPrefixResponse) XXX_Size() int

func (*RegisterPrefixResponse) XXX_Unmarshal Uses

func (m *RegisterPrefixResponse) XXX_Unmarshal(b []byte) error

type RegistrationClient Uses

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)
}

RegistrationClient is the client API for Registration service.

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

func NewRegistrationClient Uses

func NewRegistrationClient(cc *grpc.ClientConn) RegistrationClient

func NewRegistrationPRPCClient Uses

func NewRegistrationPRPCClient(client *prpc.Client) RegistrationClient

type RegistrationServer Uses

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)
}

RegistrationServer is the server API for Registration service.

Package logdog imports 9 packages (graph) and is imported by 6 packages. Updated 2018-08-19. Refresh now. Tools for package owners.