targetspb

package
v0.25.2 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: Apache-2.0 Imports: 19 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthRpc        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowRpc          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupRpc = fmt.Errorf("proto: unexpected end of group")
)
View Source
var TargetHealth_name = map[int32]string{
	0: "DOWN",
	1: "UP",
}
View Source
var TargetHealth_value = map[string]int32{
	"DOWN": 0,
	"UP":   1,
}
View Source
var TargetsRequest_State_name = map[int32]string{
	0: "ANY",
	1: "ACTIVE",
	2: "DROPPED",
}
View Source
var TargetsRequest_State_value = map[string]int32{
	"ANY":     0,
	"ACTIVE":  1,
	"DROPPED": 2,
}

Functions

func RegisterTargetsServer

func RegisterTargetsServer(s *grpc.Server, srv TargetsServer)

Types

type ActiveTarget

type ActiveTarget struct {
	DiscoveredLabels   labelpb.ZLabelSet `protobuf:"bytes,1,opt,name=discoveredLabels,proto3" json:"discoveredLabels"`
	Labels             labelpb.ZLabelSet `protobuf:"bytes,2,opt,name=labels,proto3" json:"labels"`
	ScrapePool         string            `protobuf:"bytes,3,opt,name=scrapePool,proto3" json:"scrapePool"`
	ScrapeUrl          string            `protobuf:"bytes,4,opt,name=scrapeUrl,proto3" json:"scrapeUrl"`
	GlobalUrl          string            `protobuf:"bytes,5,opt,name=globalUrl,proto3" json:"globalUrl"`
	LastError          string            `protobuf:"bytes,6,opt,name=lastError,proto3" json:"lastError"`
	LastScrape         time.Time         `protobuf:"bytes,7,opt,name=lastScrape,proto3,stdtime" json:"lastScrape"`
	LastScrapeDuration float64           `protobuf:"fixed64,8,opt,name=lastScrapeDuration,proto3" json:"lastScrapeDuration"`
	Health             TargetHealth      `protobuf:"varint,9,opt,name=health,proto3,enum=thanos.TargetHealth" json:"health"`
}

func (*ActiveTarget) Compare

func (t1 *ActiveTarget) Compare(t2 *ActiveTarget) int

func (*ActiveTarget) CompareState

func (t1 *ActiveTarget) CompareState(t2 *ActiveTarget) int

func (*ActiveTarget) Descriptor

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

func (*ActiveTarget) Marshal

func (m *ActiveTarget) Marshal() (dAtA []byte, err error)

func (*ActiveTarget) MarshalTo

func (m *ActiveTarget) MarshalTo(dAtA []byte) (int, error)

func (*ActiveTarget) MarshalToSizedBuffer

func (m *ActiveTarget) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ActiveTarget) ProtoMessage

func (*ActiveTarget) ProtoMessage()

func (*ActiveTarget) Reset

func (m *ActiveTarget) Reset()

func (*ActiveTarget) SetDiscoveredLabels

func (t *ActiveTarget) SetDiscoveredLabels(ls labels.Labels)

func (*ActiveTarget) SetLabels

func (t *ActiveTarget) SetLabels(ls labels.Labels)

func (*ActiveTarget) Size

func (m *ActiveTarget) Size() (n int)

func (*ActiveTarget) String

func (m *ActiveTarget) String() string

func (*ActiveTarget) Unmarshal

func (m *ActiveTarget) Unmarshal(dAtA []byte) error

func (*ActiveTarget) XXX_DiscardUnknown

func (m *ActiveTarget) XXX_DiscardUnknown()

func (*ActiveTarget) XXX_Marshal

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

func (*ActiveTarget) XXX_Merge

func (m *ActiveTarget) XXX_Merge(src proto.Message)

func (*ActiveTarget) XXX_Size

func (m *ActiveTarget) XXX_Size() int

func (*ActiveTarget) XXX_Unmarshal

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

type DroppedTarget

type DroppedTarget struct {
	DiscoveredLabels labelpb.ZLabelSet `protobuf:"bytes,1,opt,name=discoveredLabels,proto3" json:"discoveredLabels"`
}

func (*DroppedTarget) Compare

func (t1 *DroppedTarget) Compare(t2 *DroppedTarget) int

func (*DroppedTarget) Descriptor

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

func (*DroppedTarget) Marshal

func (m *DroppedTarget) Marshal() (dAtA []byte, err error)

func (*DroppedTarget) MarshalTo

func (m *DroppedTarget) MarshalTo(dAtA []byte) (int, error)

func (*DroppedTarget) MarshalToSizedBuffer

func (m *DroppedTarget) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DroppedTarget) ProtoMessage

func (*DroppedTarget) ProtoMessage()

func (*DroppedTarget) Reset

func (m *DroppedTarget) Reset()

func (*DroppedTarget) SetDiscoveredLabels

func (t *DroppedTarget) SetDiscoveredLabels(ls labels.Labels)

func (*DroppedTarget) Size

func (m *DroppedTarget) Size() (n int)

func (*DroppedTarget) String

func (m *DroppedTarget) String() string

func (*DroppedTarget) Unmarshal

func (m *DroppedTarget) Unmarshal(dAtA []byte) error

func (*DroppedTarget) XXX_DiscardUnknown

func (m *DroppedTarget) XXX_DiscardUnknown()

func (*DroppedTarget) XXX_Marshal

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

func (*DroppedTarget) XXX_Merge

func (m *DroppedTarget) XXX_Merge(src proto.Message)

func (*DroppedTarget) XXX_Size

func (m *DroppedTarget) XXX_Size() int

func (*DroppedTarget) XXX_Unmarshal

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

type TargetDiscovery

type TargetDiscovery struct {
	ActiveTargets  []*ActiveTarget  `protobuf:"bytes,1,rep,name=activeTargets,proto3" json:"activeTargets"`
	DroppedTargets []*DroppedTarget `protobuf:"bytes,2,rep,name=droppedTargets,proto3" json:"droppedTargets"`
}

func (*TargetDiscovery) Descriptor

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

func (*TargetDiscovery) Marshal

func (m *TargetDiscovery) Marshal() (dAtA []byte, err error)

func (*TargetDiscovery) MarshalTo

func (m *TargetDiscovery) MarshalTo(dAtA []byte) (int, error)

func (*TargetDiscovery) MarshalToSizedBuffer

func (m *TargetDiscovery) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TargetDiscovery) ProtoMessage

func (*TargetDiscovery) ProtoMessage()

func (*TargetDiscovery) Reset

func (m *TargetDiscovery) Reset()

func (*TargetDiscovery) Size

func (m *TargetDiscovery) Size() (n int)

func (*TargetDiscovery) String

func (m *TargetDiscovery) String() string

func (*TargetDiscovery) Unmarshal

func (m *TargetDiscovery) Unmarshal(dAtA []byte) error

func (*TargetDiscovery) XXX_DiscardUnknown

func (m *TargetDiscovery) XXX_DiscardUnknown()

func (*TargetDiscovery) XXX_Marshal

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

func (*TargetDiscovery) XXX_Merge

func (m *TargetDiscovery) XXX_Merge(src proto.Message)

func (*TargetDiscovery) XXX_Size

func (m *TargetDiscovery) XXX_Size() int

func (*TargetDiscovery) XXX_Unmarshal

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

type TargetHealth

type TargetHealth int32
const (
	TargetHealth_DOWN TargetHealth = 0
	TargetHealth_UP   TargetHealth = 1
)

func (TargetHealth) Compare

func (x TargetHealth) Compare(y TargetHealth) int

func (TargetHealth) EnumDescriptor

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

func (*TargetHealth) MarshalJSON

func (x *TargetHealth) MarshalJSON() ([]byte, error)

func (TargetHealth) String

func (x TargetHealth) String() string

func (*TargetHealth) UnmarshalJSON

func (x *TargetHealth) UnmarshalJSON(entry []byte) error

type TargetsClient

type TargetsClient interface {
	/// Targets has info for all targets.
	/// Returned targets are expected to include external labels.
	Targets(ctx context.Context, in *TargetsRequest, opts ...grpc.CallOption) (Targets_TargetsClient, error)
}

TargetsClient is the client API for Targets service.

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

func NewTargetsClient

func NewTargetsClient(cc *grpc.ClientConn) TargetsClient

type TargetsRequest

type TargetsRequest struct {
	State                   TargetsRequest_State            `protobuf:"varint,1,opt,name=state,proto3,enum=thanos.TargetsRequest_State" json:"state,omitempty"`
	PartialResponseStrategy storepb.PartialResponseStrategy `` /* 169-byte string literal not displayed */
}

func (*TargetsRequest) Descriptor

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

func (*TargetsRequest) Marshal

func (m *TargetsRequest) Marshal() (dAtA []byte, err error)

func (*TargetsRequest) MarshalTo

func (m *TargetsRequest) MarshalTo(dAtA []byte) (int, error)

func (*TargetsRequest) MarshalToSizedBuffer

func (m *TargetsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TargetsRequest) ProtoMessage

func (*TargetsRequest) ProtoMessage()

func (*TargetsRequest) Reset

func (m *TargetsRequest) Reset()

func (*TargetsRequest) Size

func (m *TargetsRequest) Size() (n int)

func (*TargetsRequest) String

func (m *TargetsRequest) String() string

func (*TargetsRequest) Unmarshal

func (m *TargetsRequest) Unmarshal(dAtA []byte) error

func (*TargetsRequest) XXX_DiscardUnknown

func (m *TargetsRequest) XXX_DiscardUnknown()

func (*TargetsRequest) XXX_Marshal

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

func (*TargetsRequest) XXX_Merge

func (m *TargetsRequest) XXX_Merge(src proto.Message)

func (*TargetsRequest) XXX_Size

func (m *TargetsRequest) XXX_Size() int

func (*TargetsRequest) XXX_Unmarshal

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

type TargetsRequest_State

type TargetsRequest_State int32
const (
	TargetsRequest_ANY TargetsRequest_State = 0
	/// This will make sure strings.ToLower(.String()) will match 'active' and 'dropped' values for
	/// Prometheus HTTP API.
	TargetsRequest_ACTIVE  TargetsRequest_State = 1
	TargetsRequest_DROPPED TargetsRequest_State = 2
)

func (TargetsRequest_State) EnumDescriptor

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

func (TargetsRequest_State) String

func (x TargetsRequest_State) String() string

type TargetsResponse

type TargetsResponse struct {
	// Types that are valid to be assigned to Result:
	//	*TargetsResponse_Targets
	//	*TargetsResponse_Warning
	Result isTargetsResponse_Result `protobuf_oneof:"result"`
}

func NewTargetsResponse

func NewTargetsResponse(targets *TargetDiscovery) *TargetsResponse

func NewWarningTargetsResponse

func NewWarningTargetsResponse(warning error) *TargetsResponse

func (*TargetsResponse) Descriptor

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

func (*TargetsResponse) GetResult

func (m *TargetsResponse) GetResult() isTargetsResponse_Result

func (*TargetsResponse) GetTargets

func (m *TargetsResponse) GetTargets() *TargetDiscovery

func (*TargetsResponse) GetWarning

func (m *TargetsResponse) GetWarning() string

func (*TargetsResponse) Marshal

func (m *TargetsResponse) Marshal() (dAtA []byte, err error)

func (*TargetsResponse) MarshalTo

func (m *TargetsResponse) MarshalTo(dAtA []byte) (int, error)

func (*TargetsResponse) MarshalToSizedBuffer

func (m *TargetsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TargetsResponse) ProtoMessage

func (*TargetsResponse) ProtoMessage()

func (*TargetsResponse) Reset

func (m *TargetsResponse) Reset()

func (*TargetsResponse) Size

func (m *TargetsResponse) Size() (n int)

func (*TargetsResponse) String

func (m *TargetsResponse) String() string

func (*TargetsResponse) Unmarshal

func (m *TargetsResponse) Unmarshal(dAtA []byte) error

func (*TargetsResponse) XXX_DiscardUnknown

func (m *TargetsResponse) XXX_DiscardUnknown()

func (*TargetsResponse) XXX_Marshal

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

func (*TargetsResponse) XXX_Merge

func (m *TargetsResponse) XXX_Merge(src proto.Message)

func (*TargetsResponse) XXX_OneofWrappers

func (*TargetsResponse) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*TargetsResponse) XXX_Size

func (m *TargetsResponse) XXX_Size() int

func (*TargetsResponse) XXX_Unmarshal

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

type TargetsResponse_Targets

type TargetsResponse_Targets struct {
	Targets *TargetDiscovery `protobuf:"bytes,1,opt,name=targets,proto3,oneof" json:"targets,omitempty"`
}

func (*TargetsResponse_Targets) MarshalTo

func (m *TargetsResponse_Targets) MarshalTo(dAtA []byte) (int, error)

func (*TargetsResponse_Targets) MarshalToSizedBuffer

func (m *TargetsResponse_Targets) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TargetsResponse_Targets) Size

func (m *TargetsResponse_Targets) Size() (n int)

type TargetsResponse_Warning

type TargetsResponse_Warning struct {
	Warning string `protobuf:"bytes,2,opt,name=warning,proto3,oneof" json:"warning,omitempty"`
}

func (*TargetsResponse_Warning) MarshalTo

func (m *TargetsResponse_Warning) MarshalTo(dAtA []byte) (int, error)

func (*TargetsResponse_Warning) MarshalToSizedBuffer

func (m *TargetsResponse_Warning) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TargetsResponse_Warning) Size

func (m *TargetsResponse_Warning) Size() (n int)

type TargetsServer

type TargetsServer interface {
	/// Targets has info for all targets.
	/// Returned targets are expected to include external labels.
	Targets(*TargetsRequest, Targets_TargetsServer) error
}

TargetsServer is the server API for Targets service.

type Targets_TargetsClient

type Targets_TargetsClient interface {
	Recv() (*TargetsResponse, error)
	grpc.ClientStream
}

type Targets_TargetsServer

type Targets_TargetsServer interface {
	Send(*TargetsResponse) error
	grpc.ServerStream
}

type UnimplementedTargetsServer

type UnimplementedTargetsServer struct {
}

UnimplementedTargetsServer can be embedded to have forward compatible implementations.

func (*UnimplementedTargetsServer) Targets

Jump to

Keyboard shortcuts

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