Documentation ¶
Overview ¶
Package scrapev1alpha1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterScrapeServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterScrapeServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ScrapeServiceClient) error
- func RegisterScrapeServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterScrapeServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ScrapeServiceServer) error
- func RegisterScrapeServiceServer(s grpc.ServiceRegistrar, srv ScrapeServiceServer)
- type ScrapeServiceClient
- type ScrapeServiceServer
- type Target
- func (*Target) Descriptor() ([]byte, []int)deprecated
- func (x *Target) GetDiscoveredLabels() *v1alpha1.LabelSet
- func (x *Target) GetHealth() Target_Health
- func (x *Target) GetLabels() *v1alpha1.LabelSet
- func (x *Target) GetLastError() string
- func (x *Target) GetLastScrape() *timestamppb.Timestamp
- func (x *Target) GetLastScrapeDuration() *durationpb.Duration
- func (x *Target) GetUrl() string
- func (m *Target) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Target) MarshalToVT(dAtA []byte) (int, error)
- func (m *Target) MarshalVT() (dAtA []byte, err error)
- func (*Target) ProtoMessage()
- func (x *Target) ProtoReflect() protoreflect.Message
- func (x *Target) Reset()
- func (m *Target) SizeVT() (n int)
- func (x *Target) String() string
- func (m *Target) UnmarshalVT(dAtA []byte) error
- type Target_Health
- func (Target_Health) Descriptor() protoreflect.EnumDescriptor
- func (x Target_Health) Enum() *Target_Health
- func (Target_Health) EnumDescriptor() ([]byte, []int)deprecated
- func (x Target_Health) Number() protoreflect.EnumNumber
- func (x Target_Health) String() string
- func (Target_Health) Type() protoreflect.EnumType
- type Targets
- func (*Targets) Descriptor() ([]byte, []int)deprecated
- func (x *Targets) GetTargets() []*Target
- func (m *Targets) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Targets) MarshalToVT(dAtA []byte) (int, error)
- func (m *Targets) MarshalVT() (dAtA []byte, err error)
- func (*Targets) ProtoMessage()
- func (x *Targets) ProtoReflect() protoreflect.Message
- func (x *Targets) Reset()
- func (m *Targets) SizeVT() (n int)
- func (x *Targets) String() string
- func (m *Targets) UnmarshalVT(dAtA []byte) error
- type TargetsRequest
- func (*TargetsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TargetsRequest) GetState() TargetsRequest_State
- func (m *TargetsRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *TargetsRequest) MarshalToVT(dAtA []byte) (int, error)
- func (m *TargetsRequest) MarshalVT() (dAtA []byte, err error)
- func (*TargetsRequest) ProtoMessage()
- func (x *TargetsRequest) ProtoReflect() protoreflect.Message
- func (x *TargetsRequest) Reset()
- func (m *TargetsRequest) SizeVT() (n int)
- func (x *TargetsRequest) String() string
- func (m *TargetsRequest) UnmarshalVT(dAtA []byte) error
- type TargetsRequest_State
- func (TargetsRequest_State) Descriptor() protoreflect.EnumDescriptor
- func (x TargetsRequest_State) Enum() *TargetsRequest_State
- func (TargetsRequest_State) EnumDescriptor() ([]byte, []int)deprecated
- func (x TargetsRequest_State) Number() protoreflect.EnumNumber
- func (x TargetsRequest_State) String() string
- func (TargetsRequest_State) Type() protoreflect.EnumType
- type TargetsResponse
- func (*TargetsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *TargetsResponse) GetTargets() map[string]*Targets
- func (m *TargetsResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *TargetsResponse) MarshalToVT(dAtA []byte) (int, error)
- func (m *TargetsResponse) MarshalVT() (dAtA []byte, err error)
- func (*TargetsResponse) ProtoMessage()
- func (x *TargetsResponse) ProtoReflect() protoreflect.Message
- func (x *TargetsResponse) Reset()
- func (m *TargetsResponse) SizeVT() (n int)
- func (x *TargetsResponse) String() string
- func (m *TargetsResponse) UnmarshalVT(dAtA []byte) error
- type UnimplementedScrapeServiceServer
- type UnsafeScrapeServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( TargetsRequest_State_name = map[int32]string{ 0: "STATE_ANY_UNSPECIFIED", 1: "STATE_ACTIVE", 2: "STATE_DROPPED", } TargetsRequest_State_value = map[string]int32{ "STATE_ANY_UNSPECIFIED": 0, "STATE_ACTIVE": 1, "STATE_DROPPED": 2, } )
Enum value maps for TargetsRequest_State.
var ( Target_Health_name = map[int32]string{ 0: "HEALTH_UNKNOWN_UNSPECIFIED", 1: "HEALTH_GOOD", 2: "HEALTH_BAD", } Target_Health_value = map[string]int32{ "HEALTH_UNKNOWN_UNSPECIFIED": 0, "HEALTH_GOOD": 1, "HEALTH_BAD": 2, } )
Enum value maps for Target_Health.
var File_parca_scrape_v1alpha1_scrape_proto protoreflect.FileDescriptor
var ScrapeService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "parca.scrape.v1alpha1.ScrapeService", HandlerType: (*ScrapeServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Targets", Handler: _ScrapeService_Targets_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "parca/scrape/v1alpha1/scrape.proto", }
ScrapeService_ServiceDesc is the grpc.ServiceDesc for ScrapeService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterScrapeServiceHandler ¶
func RegisterScrapeServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterScrapeServiceHandler registers the http handlers for service ScrapeService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterScrapeServiceHandlerClient ¶
func RegisterScrapeServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ScrapeServiceClient) error
RegisterScrapeServiceHandlerClient registers the http handlers for service ScrapeService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ScrapeServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ScrapeServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ScrapeServiceClient" to call the correct interceptors.
func RegisterScrapeServiceHandlerFromEndpoint ¶
func RegisterScrapeServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterScrapeServiceHandlerFromEndpoint is same as RegisterScrapeServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterScrapeServiceHandlerServer ¶
func RegisterScrapeServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ScrapeServiceServer) error
RegisterScrapeServiceHandlerServer registers the http handlers for service ScrapeService to "mux". UnaryRPC :call ScrapeServiceServer 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 RegisterScrapeServiceHandlerFromEndpoint instead.
func RegisterScrapeServiceServer ¶
func RegisterScrapeServiceServer(s grpc.ServiceRegistrar, srv ScrapeServiceServer)
Types ¶
type ScrapeServiceClient ¶
type ScrapeServiceClient interface { // Targets returns the set of scrape targets that are configured Targets(ctx context.Context, in *TargetsRequest, opts ...grpc.CallOption) (*TargetsResponse, error) }
ScrapeServiceClient is the client API for ScrapeService 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 NewScrapeServiceClient ¶
func NewScrapeServiceClient(cc grpc.ClientConnInterface) ScrapeServiceClient
type ScrapeServiceServer ¶
type ScrapeServiceServer interface { // Targets returns the set of scrape targets that are configured Targets(context.Context, *TargetsRequest) (*TargetsResponse, error) // contains filtered or unexported methods }
ScrapeServiceServer is the server API for ScrapeService service. All implementations must embed UnimplementedScrapeServiceServer for forward compatibility
type Target ¶
type Target struct { // discovered_labels are the set of labels for the target that have been discovered DiscoveredLabels *v1alpha1.LabelSet `protobuf:"bytes,1,opt,name=discovered_labels,json=discoveredLabels,proto3" json:"discovered_labels,omitempty"` // labels are the set of labels given for the target Labels *v1alpha1.LabelSet `protobuf:"bytes,2,opt,name=labels,proto3" json:"labels,omitempty"` // last_error is the error message most recently received from a scrape attempt LastError string `protobuf:"bytes,3,opt,name=last_error,json=lastError,proto3" json:"last_error,omitempty"` // last_scrape is the time stamp the last scrape request was performed LastScrape *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=last_scrape,json=lastScrape,proto3" json:"last_scrape,omitempty"` // last_scrape_duration is the duration of the last scrape request LastScrapeDuration *durationpb.Duration `protobuf:"bytes,5,opt,name=last_scrape_duration,json=lastScrapeDuration,proto3" json:"last_scrape_duration,omitempty"` // url is the url of the target Url string `protobuf:"bytes,6,opt,name=url,proto3" json:"url,omitempty"` // health indicates the current health of the target Health Target_Health `protobuf:"varint,7,opt,name=health,proto3,enum=parca.scrape.v1alpha1.Target_Health" json:"health,omitempty"` // contains filtered or unexported fields }
Target is the scrape target representation
func (*Target) Descriptor
deprecated
func (*Target) GetDiscoveredLabels ¶
func (*Target) GetHealth ¶
func (x *Target) GetHealth() Target_Health
func (*Target) GetLastError ¶
func (*Target) GetLastScrape ¶
func (x *Target) GetLastScrape() *timestamppb.Timestamp
func (*Target) GetLastScrapeDuration ¶
func (x *Target) GetLastScrapeDuration() *durationpb.Duration
func (*Target) MarshalToSizedBufferVT ¶ added in v0.5.0
func (*Target) ProtoMessage ¶
func (*Target) ProtoMessage()
func (*Target) ProtoReflect ¶
func (x *Target) ProtoReflect() protoreflect.Message
func (*Target) UnmarshalVT ¶ added in v0.5.0
type Target_Health ¶
type Target_Health int32
Health are the possible health values of a target
const ( // HEALTH_UNKNOWN_UNSPECIFIED unspecified Target_HEALTH_UNKNOWN_UNSPECIFIED Target_Health = 0 // HEALTH_GOOD healthy target Target_HEALTH_GOOD Target_Health = 1 // HEALTH_BAD unhealthy target Target_HEALTH_BAD Target_Health = 2 )
func (Target_Health) Descriptor ¶
func (Target_Health) Descriptor() protoreflect.EnumDescriptor
func (Target_Health) Enum ¶
func (x Target_Health) Enum() *Target_Health
func (Target_Health) EnumDescriptor
deprecated
func (Target_Health) EnumDescriptor() ([]byte, []int)
Deprecated: Use Target_Health.Descriptor instead.
func (Target_Health) Number ¶
func (x Target_Health) Number() protoreflect.EnumNumber
func (Target_Health) String ¶
func (x Target_Health) String() string
func (Target_Health) Type ¶
func (Target_Health) Type() protoreflect.EnumType
type Targets ¶
type Targets struct { // targets is a list of targets Targets []*Target `protobuf:"bytes,1,rep,name=targets,proto3" json:"targets,omitempty"` // contains filtered or unexported fields }
Targets is a list of targets
func (*Targets) Descriptor
deprecated
func (*Targets) GetTargets ¶
func (*Targets) MarshalToSizedBufferVT ¶ added in v0.5.0
func (*Targets) MarshalToVT ¶ added in v0.5.0
func (*Targets) ProtoMessage ¶
func (*Targets) ProtoMessage()
func (*Targets) ProtoReflect ¶
func (x *Targets) ProtoReflect() protoreflect.Message
func (*Targets) UnmarshalVT ¶ added in v0.5.0
type TargetsRequest ¶
type TargetsRequest struct { // state is the state of targets to returns State TargetsRequest_State `protobuf:"varint,1,opt,name=state,proto3,enum=parca.scrape.v1alpha1.TargetsRequest_State" json:"state,omitempty"` // contains filtered or unexported fields }
TargetsRequest contains the parameters for the set of targets to return
func (*TargetsRequest) Descriptor
deprecated
func (*TargetsRequest) Descriptor() ([]byte, []int)
Deprecated: Use TargetsRequest.ProtoReflect.Descriptor instead.
func (*TargetsRequest) GetState ¶
func (x *TargetsRequest) GetState() TargetsRequest_State
func (*TargetsRequest) MarshalToSizedBufferVT ¶ added in v0.5.0
func (m *TargetsRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*TargetsRequest) MarshalToVT ¶ added in v0.5.0
func (m *TargetsRequest) MarshalToVT(dAtA []byte) (int, error)
func (*TargetsRequest) MarshalVT ¶ added in v0.5.0
func (m *TargetsRequest) MarshalVT() (dAtA []byte, err error)
func (*TargetsRequest) ProtoMessage ¶
func (*TargetsRequest) ProtoMessage()
func (*TargetsRequest) ProtoReflect ¶
func (x *TargetsRequest) ProtoReflect() protoreflect.Message
func (*TargetsRequest) Reset ¶
func (x *TargetsRequest) Reset()
func (*TargetsRequest) SizeVT ¶ added in v0.5.0
func (m *TargetsRequest) SizeVT() (n int)
func (*TargetsRequest) String ¶
func (x *TargetsRequest) String() string
func (*TargetsRequest) UnmarshalVT ¶ added in v0.5.0
func (m *TargetsRequest) UnmarshalVT(dAtA []byte) error
type TargetsRequest_State ¶
type TargetsRequest_State int32
State represents the current state of a target
const ( // STATE_ANY_UNSPECIFIED unspecified TargetsRequest_STATE_ANY_UNSPECIFIED TargetsRequest_State = 0 // STATE_ACTIVE target active state TargetsRequest_STATE_ACTIVE TargetsRequest_State = 1 // STATE_DROPPED target dropped state TargetsRequest_STATE_DROPPED TargetsRequest_State = 2 )
func (TargetsRequest_State) Descriptor ¶
func (TargetsRequest_State) Descriptor() protoreflect.EnumDescriptor
func (TargetsRequest_State) Enum ¶
func (x TargetsRequest_State) Enum() *TargetsRequest_State
func (TargetsRequest_State) EnumDescriptor
deprecated
func (TargetsRequest_State) EnumDescriptor() ([]byte, []int)
Deprecated: Use TargetsRequest_State.Descriptor instead.
func (TargetsRequest_State) Number ¶
func (x TargetsRequest_State) Number() protoreflect.EnumNumber
func (TargetsRequest_State) String ¶
func (x TargetsRequest_State) String() string
func (TargetsRequest_State) Type ¶
func (TargetsRequest_State) Type() protoreflect.EnumType
type TargetsResponse ¶
type TargetsResponse struct { // targets is the mapping of targets Targets map[string]*Targets `` /* 155-byte string literal not displayed */ // contains filtered or unexported fields }
TargetsResponse is the set of targets for the given requested state
func (*TargetsResponse) Descriptor
deprecated
func (*TargetsResponse) Descriptor() ([]byte, []int)
Deprecated: Use TargetsResponse.ProtoReflect.Descriptor instead.
func (*TargetsResponse) GetTargets ¶
func (x *TargetsResponse) GetTargets() map[string]*Targets
func (*TargetsResponse) MarshalToSizedBufferVT ¶ added in v0.5.0
func (m *TargetsResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*TargetsResponse) MarshalToVT ¶ added in v0.5.0
func (m *TargetsResponse) MarshalToVT(dAtA []byte) (int, error)
func (*TargetsResponse) MarshalVT ¶ added in v0.5.0
func (m *TargetsResponse) MarshalVT() (dAtA []byte, err error)
func (*TargetsResponse) ProtoMessage ¶
func (*TargetsResponse) ProtoMessage()
func (*TargetsResponse) ProtoReflect ¶
func (x *TargetsResponse) ProtoReflect() protoreflect.Message
func (*TargetsResponse) Reset ¶
func (x *TargetsResponse) Reset()
func (*TargetsResponse) SizeVT ¶ added in v0.5.0
func (m *TargetsResponse) SizeVT() (n int)
func (*TargetsResponse) String ¶
func (x *TargetsResponse) String() string
func (*TargetsResponse) UnmarshalVT ¶ added in v0.5.0
func (m *TargetsResponse) UnmarshalVT(dAtA []byte) error
type UnimplementedScrapeServiceServer ¶
type UnimplementedScrapeServiceServer struct { }
UnimplementedScrapeServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedScrapeServiceServer) Targets ¶
func (UnimplementedScrapeServiceServer) Targets(context.Context, *TargetsRequest) (*TargetsResponse, error)
type UnsafeScrapeServiceServer ¶
type UnsafeScrapeServiceServer interface {
// contains filtered or unexported methods
}
UnsafeScrapeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ScrapeServiceServer will result in compilation errors.