functioncall

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DetailRequest

type DetailRequest struct {
	ID string `uri:"id" binding:"required"`
}

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(service *Service) *Handler

func (*Handler) Cancel

func (h *Handler) Cancel(c *gin.Context)

func (*Handler) Detail

func (h *Handler) Detail(c *gin.Context)

func (*Handler) List

func (h *Handler) List(c *gin.Context)

func (*Handler) Rerun

func (h *Handler) Rerun(c *gin.Context)

func (*Handler) Stats

func (h *Handler) Stats(c *gin.Context)

type Item

type Item struct {
	ID         string      `json:"id"`
	JobID      string      `json:"job_id"`
	FunctionID string      `json:"function_id"`
	GameID     string      `json:"game_id,omitempty"`
	Env        string      `json:"env,omitempty"`
	ActorID    string      `json:"actor_id,omitempty"`
	ActorType  string      `json:"actor_type,omitempty"`
	Status     string      `json:"status"`
	AgentID    string      `json:"agent_id,omitempty"`
	ServiceID  string      `json:"service_id,omitempty"`
	StartedAt  string      `json:"started_at,omitempty"`
	FinishedAt string      `json:"finished_at,omitempty"`
	DurationMs int64       `json:"duration_ms,omitempty"`
	Payload    interface{} `json:"payload,omitempty"`
	Result     interface{} `json:"result,omitempty"`
	ErrorMsg   string      `json:"error_msg,omitempty"`
	RetryCount int         `json:"retry_count,omitempty"`
	CreatedAt  string      `json:"created_at,omitempty"`
}

type ListRequest

type ListRequest struct {
	FunctionID string `form:"function_id"`
	GameID     string `form:"game_id"`
	Env        string `form:"env"`
	Status     string `form:"status"`
	ActorID    string `form:"actor_id"`
	AgentID    string `form:"agent_id"`
	StartTime  string `form:"start_time"`
	EndTime    string `form:"end_time"`
	Page       int    `form:"page"`
	PageSize   int    `form:"page_size"`
}

type ListResponse

type ListResponse struct {
	Calls    []Item `json:"calls"`
	Total    int    `json:"total"`
	Page     int    `json:"page"`
	PageSize int    `json:"page_size"`
}

type RerunRequest

type RerunRequest struct {
	ID      string      `uri:"id" binding:"required"`
	Payload interface{} `json:"payload"`
}

type RerunResponse

type RerunResponse struct {
	JobID string `json:"job_id"`
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(svcCtx *svc.ServiceContext) *Service

func (*Service) Cancel

func (s *Service) Cancel(ctx context.Context, req *DetailRequest) error

func (*Service) Detail

func (s *Service) Detail(ctx context.Context, req *DetailRequest) (*Item, error)

func (*Service) List

func (s *Service) List(ctx context.Context, req *ListRequest) (*ListResponse, error)

func (*Service) Rerun

func (s *Service) Rerun(ctx context.Context, req *RerunRequest) (*RerunResponse, error)

func (*Service) Stats

func (s *Service) Stats(ctx context.Context, req *ListRequest) (*StatsResponse, error)

type StatsResponse

type StatsResponse struct {
	Total         int     `json:"total"`
	Succeeded     int     `json:"succeeded"`
	Failed        int     `json:"failed"`
	Running       int     `json:"running"`
	Cancelled     int     `json:"cancelled"`
	Timeout       int     `json:"timeout"`
	Other         int     `json:"other"`
	AvgDurationMs float64 `json:"avg_duration_ms"`
}

Jump to

Keyboard shortcuts

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