service

package
v0.0.0-...-c67e788 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Success             = "success"
	ErrorTaskNotFound   = errors.New("task not found")
	ErrorTaskExisit     = errors.New("task already exisit")
	ErrorTaskUpdateFail = errors.New("task update fail")

	ErrorClientNotFound = errors.New("client not found")
	ErrorClientExisit   = errors.New("client already exisit")
)

Default stream errors

Functions

func ClientsAdd

func ClientsAdd(ws *websocket.Conn) (string, error)

func ClientsRemove

func ClientsRemove(cid string) error

func DebugRuntime

func DebugRuntime()

func GetInfo

func GetInfo(ctx context.Context, args *Args, reply *Reply) error

func HandleTaskMessages

func HandleTaskMessages()

func Init

func Init() error

func MetricsCollect

func MetricsCollect()

Types

type Args

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

type Client

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

func ClientsGet

func ClientsGet(cid string) *Client

type FFInfo

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

type FilesResponse

type FilesResponse struct {
	Cwd     string   `json:"cwd"`
	Folders []string `json:"folders"`
	Files   []file   `json:"files"`
}

FilesResponse http response for files endpoint.

type Gsc

type Gsc struct {
}

func (*Gsc) Start

func (c *Gsc) Start(ctx context.Context, args *Args, reply *Reply) error

func (*Gsc) Stop

func (c *Gsc) Stop(ctx context.Context, args *Args, reply *Reply) error

type GscClients

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

type GscMsg

type GscMsg struct {
	Flag string
	Msg  Message
}

type Message

type Message struct {
	Type    string `json:"type"`
	Input   string `json:"input"`
	Output  string `json:"output"`
	Payload string `json:"payload"`
}

Message payload from client.

type Reply

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

type Task

type Task struct {
	ID string
	// contains filtered or unexported fields
}

type TaskMetric

type TaskMetric struct {
	ID      string
	Statu   TaskStatusType `json:"statu"`
	Percent float64        `json:"percent"`
	Speed   string         `json:"speed"`
	FPS     float64        `json:"fps"`
	Err     string         `json:"err,omitempty"`
}

type TaskStatusType

type TaskStatusType int

Jump to

Keyboard shortcuts

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