routine

package
v0.0.0-...-d5de6aa Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	StateRunning = "running"
	StateStoped  = "stoped"
)
View Source
const (
	StatusLogSuccess = "success"
	StatusLogError   = "error"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Indicator

type Indicator struct {
	Name  string      `json:"name"`
	Desc  string      `json:"desc"`
	Value interface{} `json:"value"`
}

type IndicatorsRes

type IndicatorsRes struct {
	TotalRequests   Indicator `json:"total_requests"`
	ErrorRequests   Indicator `json:"error_requests"`
	AverageLatency  Indicator `json:"average_latency"`
	ErrorPercentage Indicator `json:"error_percentage"`
	Timestamp       time.Time `json:"timestamp"`
}

func Indicators

func Indicators(ctx context.Context) (IndicatorsRes, error)

type LogsRes

type LogsRes struct {
	Identifier  uuid.UUID `json:"identifier"`
	Latency     string    `json:"latency"`
	Initialized string    `json:"initialized"`
	Terminated  string    `json:"terminated"`
	Status      StatusLog `json:"status"`
	CreatedAt   string    `json:"created_at"`
}

func GetLogs

func GetLogs(ctx context.Context) ([]LogsRes, error)

type RoutineRes

type RoutineRes struct {
	Identifier string       `json:"identifier"`
	Name       string       `json:"name"`
	Desc       string       `json:"desc"`
	State      StateRoutine `json:"state"`
	CreatedAt  string       `json:"created_at"`
	LastRun    string       `json:"last_run"`
	Interval   string       `json:"interval"`
	Hours      string       `json:"hours"`
	Path       string       `json:"path"`
}

func Obtain

func Obtain(ctx context.Context) (RoutineRes, error)

type StateRoutine

type StateRoutine string

type StatusLog

type StatusLog string

Jump to

Keyboard shortcuts

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