util

package
v0.9.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnableFuncLts

func EnableFuncLts(client *golangsdk.ServiceClient) error

Types

type FuncLtsResp

type FuncLtsResp struct {
	GroupName  string `json:"group_name"`
	GroupId    string `json:"group_id"`
	StreamId   string `json:"stream_id"`
	StreamName string `json:"stream_name"`
}

func GetFuncLts

func GetFuncLts(client *golangsdk.ServiceClient, funcURN string) (*FuncLtsResp, error)

type FuncTemplateResp

type FuncTemplateResp struct {
	Id                  string            `json:"id"`
	Type                string            `json:"type"`
	Title               string            `json:"title"`
	TemplateName        string            `json:"template_name"`
	Description         string            `json:"description"`
	Runtime             string            `json:"runtime"`
	Handler             string            `json:"handler"`
	CodeType            string            `json:"code_type"`
	Code                string            `json:"code"`
	Timeout             int               `json:"timeout"`
	MemorySize          int               `json:"memory_size"`
	TriggerMetadataList []TriggerMetadata `json:"trigger_metadata_list"`
	TempDetail          *TempDetail       `json:"temp_detail"`
	UserData            string            `json:"user_data"`
	EncryptedUserData   string            `json:"encrypted_user_data"`
	Dependencies        string            `json:"dependencies"`
	Scene               string            `json:"scene"`
	Service             string            `json:"service"`
}

func GetFuncTemplate

func GetFuncTemplate(client *golangsdk.ServiceClient, templateId string) (*FuncTemplateResp, error)

type ListStatsOpts

type ListStatsOpts struct {
	Filter string `q:"filter" required:"true"`
	Period string `q:"period"`
	Option string `q:"option"`
	Limit  string `q:"limit"`
	Marker string `q:"marker"`
}

type ListStatsResponse

type ListStatsResponse struct {
	Count      []MonthUsed `json:"count"`
	Gbs        []MonthUsed `json:"gbs"`
	GpuGbs     []MonthUsed `json:"gpu_gbs"`
	Statistics *StatResp   `json:"monitor_data"`
}

func ListStats

func ListStats(client *golangsdk.ServiceClient, opts ListStatsOpts) (*ListStatsResponse, error)

type MonthUsed

type MonthUsed struct {
	Date  string  `json:"date"`
	Value float64 `json:"value"`
}

type SlaReport

type SlaReport struct {
	TimeStamp int     `json:"timestamp"`
	Value     float64 `json:"value"`
}

type StatResp

type StatResp struct {
	Count               []SlaReport `json:"count"`
	Duration            []SlaReport `json:"duration"`
	FailCount           []SlaReport `json:"fail_count"`
	MaxDuration         []SlaReport `json:"max_duration"`
	MinDuration         []SlaReport `json:"min_duration"`
	RejectCount         []SlaReport `json:"reject_count"`
	FuncErrorCount      []SlaReport `json:"function_error_count"`
	SysErrorCount       []SlaReport `json:"system_error_count"`
	ReservedInstanceNum []SlaReport `json:"reserved_instance_num"`
	ConcurrencyNum      []SlaReport `json:"concurrency_num"`
}

func ListStatsPeriod

func ListStatsPeriod(client *golangsdk.ServiceClient, funcURN, period string) (*StatResp, error)

type TempDetail

type TempDetail struct {
	Input   string `json:"input"`
	Output  string `json:"output"`
	Warning string `json:"warning"`
}

type TriggerMetadata

type TriggerMetadata struct {
	TriggerName string `json:"trigger_name"`
	TriggerType string `json:"trigger_type"`
	EventType   string `json:"event_type"`
	EventData   string `json:"event_data"`
}

Jump to

Keyboard shortcuts

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