client

package
v0.0.0-...-2817d91 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallAddService

func CallAddService(ctx context.Context, req *AddServiceRequest) (response *http.Response, err error)

func CallModelValidate

func CallModelValidate(ctx context.Context, req *ScriptValidateRequest) (response *http.Response, err error)

func CallNormalTest

func CallNormalTest(ctx context.Context, req *NormalTesterSettings) (response *http.Response, err error)

func CreateMonitorService

func CreateMonitorService(ctx context.Context, serviceName string, tags map[string]string) (err error)

创建prometheus监控

func DeleteMonitorService

func DeleteMonitorService(ctx context.Context, serviceName string) (err error)

删除prometheus监控

func FetchSerialData

func FetchSerialData(ctx context.Context, startTime, endTime time.Time, tags map[string]string) (data map[string][]SerialDataPoint, err error)

func GetConfigMap

func GetConfigMap(ctx context.Context, name string) (configMap *corev1.ConfigMap, err error)

获取ConfigMap

func InitClient

func InitClient()

func InitHTTPClient

func InitHTTPClient()

func InitK8sClient

func InitK8sClient()

func InitPrometheusClient

func InitPrometheusClient()

func UpdateConfigMap

func UpdateConfigMap(ctx context.Context, name string, configMap *corev1.ConfigMap) (err error)

更新ConfigMap

Types

type AddServiceRequest

type AddServiceRequest struct {
	ServiceName string `json:"service_name"`
	ModelName   string `json:"model_name"`
	Tags        string `json:"tags"`
}

type NormalTesterSettings

type NormalTesterSettings struct {
	Name        string `json:"name"`
	Method      string `json:"method"`
	Url         string `json:"url"`
	ContentType string `json:"content_type"`
	Content     string `json:"content"`
	InitialQPS  *int64 `json:"initial_qps"`
	Timeout     *int64 `json:"timeout"`
}

调用压测模块的请求体

type ScriptValidateRequest

type ScriptValidateRequest struct {
	ModelName   string  `json:"model_name"`
	TrainScript *string `json:"train_script"`
	InferScript *string `json:"infer_script"`
}

type SerialDataPoint

type SerialDataPoint struct {
	Timestamp string
	Value     float64
}

func RealTimeData

func RealTimeData(ctx context.Context, tagStr string) (data SerialDataPoint, err error)

查询服务的qps实时数据点

Jump to

Keyboard shortcuts

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