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.
Index ¶
- func FileDescriptorSet() *descriptor.FileDescriptorSet
- func RegisterRegistrationServer(s prpc.Registrar, srv RegistrationServer)
- type DecoratedRegistration
- type RegisterPrefixRequest
- func (*RegisterPrefixRequest) Descriptor() ([]byte, []int)
- func (m *RegisterPrefixRequest) GetExpiration() *duration.Duration
- func (req *RegisterPrefixRequest) GetMessageProject() string
- func (m *RegisterPrefixRequest) GetOpNonce() []byte
- func (m *RegisterPrefixRequest) GetPrefix() string
- func (m *RegisterPrefixRequest) GetProject() string
- func (m *RegisterPrefixRequest) GetSourceInfo() []string
- func (*RegisterPrefixRequest) ProtoMessage()
- func (m *RegisterPrefixRequest) Reset()
- func (m *RegisterPrefixRequest) String() string
- func (m *RegisterPrefixRequest) XXX_DiscardUnknown()
- func (m *RegisterPrefixRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RegisterPrefixRequest) XXX_Merge(src proto.Message)
- func (m *RegisterPrefixRequest) XXX_Size() int
- func (m *RegisterPrefixRequest) XXX_Unmarshal(b []byte) error
- type RegisterPrefixResponse
- func (*RegisterPrefixResponse) Descriptor() ([]byte, []int)
- func (m *RegisterPrefixResponse) GetLogBundleTopic() string
- func (m *RegisterPrefixResponse) GetSecret() []byte
- func (*RegisterPrefixResponse) ProtoMessage()
- func (m *RegisterPrefixResponse) Reset()
- func (m *RegisterPrefixResponse) String() string
- func (m *RegisterPrefixResponse) XXX_DiscardUnknown()
- func (m *RegisterPrefixResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RegisterPrefixResponse) XXX_Merge(src proto.Message)
- func (m *RegisterPrefixResponse) XXX_Size() int
- func (m *RegisterPrefixResponse) XXX_Unmarshal(b []byte) error
- type RegistrationClient
- type RegistrationServer
- type UnimplementedRegistrationServer
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(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 (*DecoratedRegistration) RegisterPrefix ¶
func (s *DecoratedRegistration) RegisterPrefix(ctx context.Context, req *RegisterPrefixRequest) (rsp *RegisterPrefixResponse, err error)
type RegisterPrefixRequest ¶
type RegisterPrefixRequest struct { // The log stream's project. Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"` // The log stream prefix to register. Prefix string `protobuf:"bytes,2,opt,name=prefix,proto3" json:"prefix,omitempty"` // Optional information about the registering agent. SourceInfo []string `protobuf:"bytes,3,rep,name=source_info,json=sourceInfo,proto3" 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,proto3" 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 ¶
func (*RegisterPrefixRequest) Descriptor() ([]byte, []int)
func (*RegisterPrefixRequest) GetExpiration ¶
func (m *RegisterPrefixRequest) GetExpiration() *duration.Duration
func (*RegisterPrefixRequest) GetMessageProject ¶
func (req *RegisterPrefixRequest) GetMessageProject() string
GetMessageProject implements ProjectBoundMessage.
func (*RegisterPrefixRequest) GetOpNonce ¶
func (m *RegisterPrefixRequest) GetOpNonce() []byte
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
func (*RegisterPrefixRequest) XXX_DiscardUnknown ¶
func (m *RegisterPrefixRequest) XXX_DiscardUnknown()
func (*RegisterPrefixRequest) XXX_Marshal ¶
func (m *RegisterPrefixRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RegisterPrefixRequest) XXX_Merge ¶
func (m *RegisterPrefixRequest) XXX_Merge(src proto.Message)
func (*RegisterPrefixRequest) XXX_Size ¶
func (m *RegisterPrefixRequest) XXX_Size() int
func (*RegisterPrefixRequest) XXX_Unmarshal ¶
func (m *RegisterPrefixRequest) XXX_Unmarshal(b []byte) error
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,proto3" 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 ¶
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
func (*RegisterPrefixResponse) XXX_DiscardUnknown ¶
func (m *RegisterPrefixResponse) XXX_DiscardUnknown()
func (*RegisterPrefixResponse) XXX_Marshal ¶
func (m *RegisterPrefixResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RegisterPrefixResponse) XXX_Merge ¶
func (m *RegisterPrefixResponse) XXX_Merge(src proto.Message)
func (*RegisterPrefixResponse) XXX_Size ¶
func (m *RegisterPrefixResponse) XXX_Size() int
func (*RegisterPrefixResponse) XXX_Unmarshal ¶
func (m *RegisterPrefixResponse) XXX_Unmarshal(b []byte) error
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) }
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 ¶
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) }
RegistrationServer is the server API for Registration service.
type UnimplementedRegistrationServer ¶
type UnimplementedRegistrationServer struct { }
UnimplementedRegistrationServer can be embedded to have forward compatible implementations.
func (*UnimplementedRegistrationServer) RegisterPrefix ¶
func (*UnimplementedRegistrationServer) RegisterPrefix(ctx context.Context, req *RegisterPrefixRequest) (*RegisterPrefixResponse, error)