console

package
v0.1.62 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Console

func Console() model.Action

Types

type Client

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

func NewClient

func NewClient(ws *websocket.Conn, server *Server) *Client

func (*Client) Conn

func (client *Client) Conn() *websocket.Conn

func (*Client) Listen

func (client *Client) Listen()

func (*Client) Write

func (client *Client) Write(msg *Message)
type Link struct {
	Id  string `json:"id"`
	Src string `json:"src"`
	Dst string `json:"dst"`
}

type Message

type Message struct {
	Source  string    `json:"source"`
	Routers []string  `json:"routers"`
	Links   []*Link   `json:"links"`
	Metrics []*Metric `json:"metrics"`
}

type Metric

type Metric struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type Server

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

func NewServer

func NewServer() *Server

func (*Server) Add

func (server *Server) Add(c *Client)

func (*Server) Del

func (server *Server) Del(c *Client)

func (*Server) Done

func (server *Server) Done()

func (*Server) Listen

func (server *Server) Listen()

func (*Server) SendAll

func (server *Server) SendAll(msg *Message)

Jump to

Keyboard shortcuts

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