Documentation ¶
Overview ¶
Package collectorv1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterCollectorServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterCollectorServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CollectorServiceClient) error
- func RegisterCollectorServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterCollectorServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CollectorServiceServer) error
- func RegisterCollectorServiceServer(s grpc.ServiceRegistrar, srv CollectorServiceServer)
- type CollectDetails
- func (*CollectDetails) Descriptor() ([]byte, []int)deprecated
- func (x *CollectDetails) GetApiVersion() string
- func (x *CollectDetails) GetMetadata() *v1.Metadata
- func (x *CollectDetails) GetSpec() *Spec
- func (x *CollectDetails) GetStatus() *CollectStatus
- func (*CollectDetails) ProtoMessage()
- func (x *CollectDetails) ProtoReflect() protoreflect.Message
- func (x *CollectDetails) Reset()
- func (x *CollectDetails) String() string
- type CollectStatus
- type CollectorServiceClient
- type CollectorServiceServer
- type GetSourceRequest
- func (*GetSourceRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetSourceRequest) GetFormat() v1.Format
- func (x *GetSourceRequest) GetParser() v1.Parser
- func (x *GetSourceRequest) GetUrl() string
- func (*GetSourceRequest) ProtoMessage()
- func (x *GetSourceRequest) ProtoReflect() protoreflect.Message
- func (x *GetSourceRequest) Reset()
- func (x *GetSourceRequest) String() string
- type GetSourceResponse
- func (*GetSourceResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetSourceResponse) GetResult() *SourceDetails
- func (*GetSourceResponse) ProtoMessage()
- func (x *GetSourceResponse) ProtoReflect() protoreflect.Message
- func (x *GetSourceResponse) Reset()
- func (x *GetSourceResponse) String() string
- type Sink
- type SourceDetails
- func (*SourceDetails) Descriptor() ([]byte, []int)deprecated
- func (x *SourceDetails) GetMetadata() *SourceMetadata
- func (x *SourceDetails) GetSource() *v1.Source
- func (*SourceDetails) ProtoMessage()
- func (x *SourceDetails) ProtoReflect() protoreflect.Message
- func (x *SourceDetails) Reset()
- func (x *SourceDetails) String() string
- type SourceMetadata
- func (*SourceMetadata) Descriptor() ([]byte, []int)deprecated
- func (x *SourceMetadata) GetDigest() string
- func (x *SourceMetadata) GetHeaders() map[string]string
- func (x *SourceMetadata) GetSize() int64
- func (*SourceMetadata) ProtoMessage()
- func (x *SourceMetadata) ProtoReflect() protoreflect.Message
- func (x *SourceMetadata) Reset()
- func (x *SourceMetadata) String() string
- type Spec
- type Status
- type UnimplementedCollectorServiceServer
- type UnsafeCollectorServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( Status_name = map[int32]string{ 0: "UNSPECIFIED", 1: "PENDING", 2: "SUCCESS", 3: "FAILURE", } Status_value = map[string]int32{ "UNSPECIFIED": 0, "PENDING": 1, "SUCCESS": 2, "FAILURE": 3, } )
Enum value maps for Status.
var CollectorService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "collector.v1.CollectorService", HandlerType: (*CollectorServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetSource", Handler: _CollectorService_GetSource_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "collectorapi/v1/service.proto", }
CollectorService_ServiceDesc is the grpc.ServiceDesc for CollectorService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_collectorapi_v1_collector_proto protoreflect.FileDescriptor
var File_collectorapi_v1_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCollectorServiceHandler ¶
func RegisterCollectorServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterCollectorServiceHandler registers the http handlers for service CollectorService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterCollectorServiceHandlerClient ¶
func RegisterCollectorServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CollectorServiceClient) error
RegisterCollectorServiceHandlerClient registers the http handlers for service CollectorService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CollectorServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CollectorServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "CollectorServiceClient" to call the correct interceptors.
func RegisterCollectorServiceHandlerFromEndpoint ¶
func RegisterCollectorServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterCollectorServiceHandlerFromEndpoint is same as RegisterCollectorServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterCollectorServiceHandlerServer ¶
func RegisterCollectorServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CollectorServiceServer) error
RegisterCollectorServiceHandlerServer registers the http handlers for service CollectorService to "mux". UnaryRPC :call CollectorServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterCollectorServiceHandlerFromEndpoint instead.
func RegisterCollectorServiceServer ¶
func RegisterCollectorServiceServer(s grpc.ServiceRegistrar, srv CollectorServiceServer)
Types ¶
type CollectDetails ¶
type CollectDetails struct { ApiVersion string `protobuf:"bytes,1,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` Metadata *v1.Metadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` Spec *Spec `protobuf:"bytes,3,opt,name=spec,proto3" json:"spec,omitempty"` Status *CollectStatus `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
CollectDetails contains the set of information for a given collected source.
func (*CollectDetails) Descriptor
deprecated
func (*CollectDetails) Descriptor() ([]byte, []int)
Deprecated: Use CollectDetails.ProtoReflect.Descriptor instead.
func (*CollectDetails) GetApiVersion ¶
func (x *CollectDetails) GetApiVersion() string
func (*CollectDetails) GetMetadata ¶
func (x *CollectDetails) GetMetadata() *v1.Metadata
func (*CollectDetails) GetSpec ¶
func (x *CollectDetails) GetSpec() *Spec
func (*CollectDetails) GetStatus ¶
func (x *CollectDetails) GetStatus() *CollectStatus
func (*CollectDetails) ProtoMessage ¶
func (*CollectDetails) ProtoMessage()
func (*CollectDetails) ProtoReflect ¶
func (x *CollectDetails) ProtoReflect() protoreflect.Message
func (*CollectDetails) Reset ¶
func (x *CollectDetails) Reset()
func (*CollectDetails) String ¶
func (x *CollectDetails) String() string
type CollectStatus ¶
type CollectStatus struct { Status Status `protobuf:"varint,3,opt,name=status,proto3,enum=collector.v1.Status" json:"status,omitempty"` // contains filtered or unexported fields }
func (*CollectStatus) Descriptor
deprecated
func (*CollectStatus) Descriptor() ([]byte, []int)
Deprecated: Use CollectStatus.ProtoReflect.Descriptor instead.
func (*CollectStatus) GetStatus ¶
func (x *CollectStatus) GetStatus() Status
func (*CollectStatus) ProtoMessage ¶
func (*CollectStatus) ProtoMessage()
func (*CollectStatus) ProtoReflect ¶
func (x *CollectStatus) ProtoReflect() protoreflect.Message
func (*CollectStatus) Reset ¶
func (x *CollectStatus) Reset()
func (*CollectStatus) String ¶
func (x *CollectStatus) String() string
type CollectorServiceClient ¶
type CollectorServiceClient interface { // A unary RPC used to collect a source GetSource(ctx context.Context, in *GetSourceRequest, opts ...grpc.CallOption) (*GetSourceResponse, error) }
CollectorServiceClient is the client API for CollectorService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewCollectorServiceClient ¶
func NewCollectorServiceClient(cc grpc.ClientConnInterface) CollectorServiceClient
type CollectorServiceServer ¶
type CollectorServiceServer interface { // A unary RPC used to collect a source GetSource(context.Context, *GetSourceRequest) (*GetSourceResponse, error) // contains filtered or unexported methods }
CollectorServiceServer is the server API for CollectorService service. All implementations must embed UnimplementedCollectorServiceServer for forward compatibility
type GetSourceRequest ¶
type GetSourceRequest struct { Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` // if not provided we can attempt to discover the format from the given URL Format v1.Format `protobuf:"varint,2,opt,name=format,proto3,enum=core.v1.Format" json:"format,omitempty"` Parser v1.Parser `protobuf:"varint,3,opt,name=parser,proto3,enum=core.v1.Parser" json:"parser,omitempty"` // contains filtered or unexported fields }
------------ GET ------------
func (*GetSourceRequest) Descriptor
deprecated
func (*GetSourceRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetSourceRequest.ProtoReflect.Descriptor instead.
func (*GetSourceRequest) GetFormat ¶
func (x *GetSourceRequest) GetFormat() v1.Format
func (*GetSourceRequest) GetParser ¶
func (x *GetSourceRequest) GetParser() v1.Parser
func (*GetSourceRequest) GetUrl ¶
func (x *GetSourceRequest) GetUrl() string
func (*GetSourceRequest) ProtoMessage ¶
func (*GetSourceRequest) ProtoMessage()
func (*GetSourceRequest) ProtoReflect ¶
func (x *GetSourceRequest) ProtoReflect() protoreflect.Message
func (*GetSourceRequest) Reset ¶
func (x *GetSourceRequest) Reset()
func (*GetSourceRequest) String ¶
func (x *GetSourceRequest) String() string
type GetSourceResponse ¶
type GetSourceResponse struct { Result *SourceDetails `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` // contains filtered or unexported fields }
func (*GetSourceResponse) Descriptor
deprecated
func (*GetSourceResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetSourceResponse.ProtoReflect.Descriptor instead.
func (*GetSourceResponse) GetResult ¶
func (x *GetSourceResponse) GetResult() *SourceDetails
func (*GetSourceResponse) ProtoMessage ¶
func (*GetSourceResponse) ProtoMessage()
func (*GetSourceResponse) ProtoReflect ¶
func (x *GetSourceResponse) ProtoReflect() protoreflect.Message
func (*GetSourceResponse) Reset ¶
func (x *GetSourceResponse) Reset()
func (*GetSourceResponse) String ¶
func (x *GetSourceResponse) String() string
type Sink ¶
type Sink struct { // url where index is stored (i.e gs://<project-name>-index/index.json) Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` Format v1.Format `protobuf:"varint,2,opt,name=format,proto3,enum=core.v1.Format" json:"format,omitempty"` // contains filtered or unexported fields }
Sink defines where the collected source is stored and in which format
func (*Sink) Descriptor
deprecated
func (*Sink) ProtoMessage ¶
func (*Sink) ProtoMessage()
func (*Sink) ProtoReflect ¶
func (x *Sink) ProtoReflect() protoreflect.Message
type SourceDetails ¶
type SourceDetails struct { Source *v1.Source `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` Metadata *SourceMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` // contains filtered or unexported fields }
func (*SourceDetails) Descriptor
deprecated
func (*SourceDetails) Descriptor() ([]byte, []int)
Deprecated: Use SourceDetails.ProtoReflect.Descriptor instead.
func (*SourceDetails) GetMetadata ¶
func (x *SourceDetails) GetMetadata() *SourceMetadata
func (*SourceDetails) GetSource ¶
func (x *SourceDetails) GetSource() *v1.Source
func (*SourceDetails) ProtoMessage ¶
func (*SourceDetails) ProtoMessage()
func (*SourceDetails) ProtoReflect ¶
func (x *SourceDetails) ProtoReflect() protoreflect.Message
func (*SourceDetails) Reset ¶
func (x *SourceDetails) Reset()
func (*SourceDetails) String ¶
func (x *SourceDetails) String() string
type SourceMetadata ¶
type SourceMetadata struct { Digest string `protobuf:"bytes,1,opt,name=digest,proto3" json:"digest,omitempty"` Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` Headers map[string]string `` /* 155-byte string literal not displayed */ // contains filtered or unexported fields }
func (*SourceMetadata) Descriptor
deprecated
func (*SourceMetadata) Descriptor() ([]byte, []int)
Deprecated: Use SourceMetadata.ProtoReflect.Descriptor instead.
func (*SourceMetadata) GetDigest ¶
func (x *SourceMetadata) GetDigest() string
func (*SourceMetadata) GetHeaders ¶
func (x *SourceMetadata) GetHeaders() map[string]string
func (*SourceMetadata) GetSize ¶
func (x *SourceMetadata) GetSize() int64
func (*SourceMetadata) ProtoMessage ¶
func (*SourceMetadata) ProtoMessage()
func (*SourceMetadata) ProtoReflect ¶
func (x *SourceMetadata) ProtoReflect() protoreflect.Message
func (*SourceMetadata) Reset ¶
func (x *SourceMetadata) Reset()
func (*SourceMetadata) String ¶
func (x *SourceMetadata) String() string
type Spec ¶
type Spec struct { Source *v1.Source `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` Sink *Sink `protobuf:"bytes,2,opt,name=sink,proto3" json:"sink,omitempty"` // contains filtered or unexported fields }
func (*Spec) Descriptor
deprecated
func (*Spec) ProtoMessage ¶
func (*Spec) ProtoMessage()
func (*Spec) ProtoReflect ¶
func (x *Spec) ProtoReflect() protoreflect.Message
type Status ¶
type Status int32
SyncStatus specifies the state of a given synchronisation request. Where a synchronisation state will correspond to a specfic source
func (Status) Descriptor ¶
func (Status) Descriptor() protoreflect.EnumDescriptor
func (Status) EnumDescriptor
deprecated
func (Status) Number ¶
func (x Status) Number() protoreflect.EnumNumber
func (Status) Type ¶
func (Status) Type() protoreflect.EnumType
type UnimplementedCollectorServiceServer ¶
type UnimplementedCollectorServiceServer struct { }
UnimplementedCollectorServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedCollectorServiceServer) GetSource ¶
func (UnimplementedCollectorServiceServer) GetSource(context.Context, *GetSourceRequest) (*GetSourceResponse, error)
type UnsafeCollectorServiceServer ¶
type UnsafeCollectorServiceServer interface {
// contains filtered or unexported methods
}
UnsafeCollectorServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CollectorServiceServer will result in compilation errors.