Back to godoc.org

Package handler

v0.0.0-...-1927dbb
Latest Go to latest

The latest major version is .

Published: Jan 10, 2019 | License: Apache-2.0 | Module: github.com/XiaoMi/naftis

Index

Variables

var (
	// ErrInvalidServiceUID is returned when request contains invalid service UID
	ErrInvalidServiceUID = errors.New("invalid serviceUID")
	// ErrInvalidVarMap is returned when request contains invalid variable maps
	ErrInvalidVarMap = errors.New("invalid varMap")
	// ErrInvalidTmplID is returned when request contains invalid task template ID
	ErrInvalidTmplID = errors.New("invalid tmplID")
	// ErrInvalidCommand is returned when request contains invalid command
	ErrInvalidCommand = errors.New("invalid command")
	// ErrInvalidNamespace is returned when request contains invalid namespace
	ErrInvalidNamespace = errors.New("invalid namespace")
)

func AddTaskTmpls

func AddTaskTmpls(c *gin.Context)

AddTaskTmpls adds a task template.

func AddTasks

func AddTasks(c *gin.Context)

AddTasks adds a task into task worker.

func D3Graph

func D3Graph(c *gin.Context)

D3Graph returns d3 graph data filtered by provided root service name.

func DeleteTaskTmpls

func DeleteTaskTmpls(c *gin.Context)

DeleteTaskTmpls soft deletes a task template.

func DeleteTasks

func DeleteTasks(c *gin.Context)

DeleteTasks delete specific task. Deprecated: the function is already Deprecated.

func Healthy

func Healthy(c *gin.Context)

Healthy returns server's health information.

func Kubeinfo

func Kubeinfo(c *gin.Context)

Kubeinfo returns data like namespaces of Kubernetes.

func ListMetrics

func ListMetrics(c *gin.Context)

ListMetrics returns some overview metrics of service mesh.

func ListStatus

func ListStatus(c *gin.Context)

ListStatus returns all services and pod status of istio.

func ListTaskTmplVars

func ListTaskTmplVars(c *gin.Context)

ListTaskTmplVars returns variable map of specific task template.

func ListTaskTmpls

func ListTaskTmpls(c *gin.Context)

ListTaskTmpls returns specified task template.

func ListTasks

func ListTasks(c *gin.Context)

ListTasks returns all stored tasks.

func LoginAccount

func LoginAccount(c *gin.Context)

LoginAccount validates user account.

func LoginUser

func LoginUser(c *gin.Context)

LoginUser returns current login user.

func Pods

func Pods(c *gin.Context)

Pods queries pods's of specific pod by name.

func ServeWS

func ServeWS(hub *Hub, w http.ResponseWriter, r *http.Request)

ServeWS serves a websocket server. TODO improve authentication

func ServicePods

func ServicePods(c *gin.Context)

ServicePods queries pods's of specific pod by service UID.

func Services

func Services(c *gin.Context)

Services returns all available services.

func UpdateTaskTmpls

func UpdateTaskTmpls(c *gin.Context)

UpdateTaskTmpls updates a task template.

func UpdateTasks

func UpdateTasks(c *gin.Context)

UpdateTasks updates specific task. Deprecated: the function is already Deprecated.

type Client

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

Client handles connection and the hub.

type Hub

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

Hub maintains the set of active clients and broadcasts messages to specific clients.

func NewHub

func NewHub() *Hub

NewHub constructs a hub instance.

func (*Hub) Run

func (h *Hub) Run()

Run starts hub.

type Message

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

Message contains message content and message receiver

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier