scrapev1alpha1

package
v0.22.0 Latest Latest
Warning

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

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

Documentation

Overview

Package scrapev1alpha1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
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.

View Source
var File_parca_scrape_v1alpha1_scrape_proto protoreflect.FileDescriptor
View Source
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.

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) Descriptor() ([]byte, []int)

Deprecated: Use Target.ProtoReflect.Descriptor instead.

func (*Target) GetDiscoveredLabels

func (x *Target) GetDiscoveredLabels() *v1alpha1.LabelSet

func (*Target) GetHealth

func (x *Target) GetHealth() Target_Health

func (*Target) GetLabels

func (x *Target) GetLabels() *v1alpha1.LabelSet

func (*Target) GetLastError

func (x *Target) GetLastError() string

func (*Target) GetLastScrape

func (x *Target) GetLastScrape() *timestamppb.Timestamp

func (*Target) GetLastScrapeDuration

func (x *Target) GetLastScrapeDuration() *durationpb.Duration

func (*Target) GetUrl

func (x *Target) GetUrl() string

func (*Target) MarshalToSizedBufferVT added in v0.5.0

func (m *Target) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Target) MarshalToVT added in v0.5.0

func (m *Target) MarshalToVT(dAtA []byte) (int, error)

func (*Target) MarshalVT added in v0.5.0

func (m *Target) MarshalVT() (dAtA []byte, err error)

func (*Target) ProtoMessage

func (*Target) ProtoMessage()

func (*Target) ProtoReflect

func (x *Target) ProtoReflect() protoreflect.Message

func (*Target) Reset

func (x *Target) Reset()

func (*Target) SizeVT added in v0.5.0

func (m *Target) SizeVT() (n int)

func (*Target) String

func (x *Target) String() string

func (*Target) UnmarshalVT added in v0.5.0

func (m *Target) UnmarshalVT(dAtA []byte) error

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) 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 (Target_Health) String

func (x Target_Health) String() string

func (Target_Health) Type

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) Descriptor() ([]byte, []int)

Deprecated: Use Targets.ProtoReflect.Descriptor instead.

func (*Targets) GetTargets

func (x *Targets) GetTargets() []*Target

func (*Targets) MarshalToSizedBufferVT added in v0.5.0

func (m *Targets) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Targets) MarshalToVT added in v0.5.0

func (m *Targets) MarshalToVT(dAtA []byte) (int, error)

func (*Targets) MarshalVT added in v0.5.0

func (m *Targets) MarshalVT() (dAtA []byte, err error)

func (*Targets) ProtoMessage

func (*Targets) ProtoMessage()

func (*Targets) ProtoReflect

func (x *Targets) ProtoReflect() protoreflect.Message

func (*Targets) Reset

func (x *Targets) Reset()

func (*Targets) SizeVT added in v0.5.0

func (m *Targets) SizeVT() (n int)

func (*Targets) String

func (x *Targets) String() string

func (*Targets) UnmarshalVT added in v0.5.0

func (m *Targets) UnmarshalVT(dAtA []byte) error

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

func (TargetsRequest_State) EnumDescriptor deprecated

func (TargetsRequest_State) EnumDescriptor() ([]byte, []int)

Deprecated: Use TargetsRequest_State.Descriptor instead.

func (TargetsRequest_State) Number

func (TargetsRequest_State) String

func (x TargetsRequest_State) String() string

func (TargetsRequest_State) Type

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

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.

Jump to

Keyboard shortcuts

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