service

package module
v0.0.0-...-31263be Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

* * Generated by go-doudou v2.0.4. * You can edit it as your need.

* * Generated by go-doudou v2.0.4. * You can edit it as your need.

Index

Constants

View Source
const (
	SUCCESS_STATUS = "success"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Prom

type Prom interface {
	// Query is compatible to Prometheus POST /api/v1/query
	Query(ctx context.Context,

		query string,

		time *string,

		timeout *string) (data dto.QueryData, status string, err error)

	// GetQuery is compatible to Prometheus GET /api/v1/query
	GetQuery(ctx context.Context,

		query string,

		time *string,

		timeout *string) (data dto.QueryData, status string, err error)

	// Query_range is compatible to Prometheus POST /api/v1/query_range
	Query_range(ctx context.Context,

		query string,

		start *string,

		end *string,

		step *string,

		timeout *string) (data dto.QueryData, status string, err error)

	// GetQuery_range is compatible to Prometheus GET /api/v1/query_range
	GetQuery_range(ctx context.Context,

		query string,

		start *string,

		end *string,

		step *string,

		timeout *string) (data dto.QueryData, status string, err error)

	// GetLabel_Label_nameValues Returns label values
	// The following endpoint returns a list of label values for a provided label name
	//
	// The "data" section of the JSON response is a list of string label values.
	//
	GetLabel_Label_nameValues(ctx context.Context,

		start *string,

		end *string,

		match *[]string,

		label_name string) (data []string, status string, err error)
}

type PromImpl

type PromImpl struct {
	pb.UnimplementedPromServiceServer
	// contains filtered or unexported fields
}

func NewProm

func NewProm(conf *config.Config, adaptor applications.IPromAdaptor) *PromImpl

func (*PromImpl) GetLabelLabelNameValuesRpc

func (receiver *PromImpl) GetLabelLabelNameValuesRpc(ctx context.Context, request *pb.GetLabelLabelNameValuesRpcRequest) (*pb.GetLabelLabelNameValuesRpcResponse, error)

func (*PromImpl) GetLabel_Label_nameValues

func (receiver *PromImpl) GetLabel_Label_nameValues(ctx context.Context, start *string, end *string, match *[]string, label_name string) (data []string, status string, err error)

func (*PromImpl) GetQuery

func (receiver *PromImpl) GetQuery(ctx context.Context, query string, time *string, timeout *string) (data dto.QueryData, status string, err error)

func (*PromImpl) GetQueryRangeRpc

func (receiver *PromImpl) GetQueryRangeRpc(ctx context.Context, request *pb.GetQueryRangeRpcRequest) (*pb.GetQueryRangeRpcResponse, error)

func (*PromImpl) GetQueryRpc

func (receiver *PromImpl) GetQueryRpc(ctx context.Context, request *pb.GetQueryRpcRequest) (*pb.GetQueryRpcResponse, error)

func (*PromImpl) GetQuery_range

func (receiver *PromImpl) GetQuery_range(ctx context.Context, query string, start *string, end *string, step *string, timeout *string) (data dto.QueryData, status string, err error)

func (*PromImpl) Query

func (receiver *PromImpl) Query(ctx context.Context, query string, t *string, timeout *string) (data dto.QueryData, status string, err error)

func (*PromImpl) QueryRangeRpc

func (receiver *PromImpl) QueryRangeRpc(ctx context.Context, request *pb.QueryRangeRpcRequest) (*pb.QueryRangeRpcResponse, error)

func (*PromImpl) QueryRpc

func (receiver *PromImpl) QueryRpc(ctx context.Context, request *pb.QueryRpcRequest) (*pb.QueryRpcResponse, error)

func (*PromImpl) Query_range

func (receiver *PromImpl) Query_range(ctx context.Context, query string, start *string, end *string, step *string, timeout *string) (data dto.QueryData, status string, err error)

type QueryResponseWrapper

type QueryResponseWrapper struct {
	Result dto.QueryResponse
	Err    error
}

type StringSliceResult

type StringSliceResult struct {
	Result []string
	Err    error
}

Directories

Path Synopsis
* * Generated by go-doudou v2.0.4.
* * Generated by go-doudou v2.0.4.
* * Generated by go-doudou v2.0.4.
* * Generated by go-doudou v2.0.4.
* * Generated by go-doudou v2.0.4.
* * Generated by go-doudou v2.0.4.
* * Generated by go-doudou v2.0.4.
* * Generated by go-doudou v2.0.4.
* * Generated by go-doudou v2.0.4.
* * Generated by go-doudou v2.0.4.
transport
grpc
* * Generated by go-doudou v2.0.4.
* * Generated by go-doudou v2.0.4.
httpsrv
* * Generated by go-doudou v2.0.4.
* * Generated by go-doudou v2.0.4.

Jump to

Keyboard shortcuts

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