remote

package
v0.0.0-...-9c04300 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2020 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

远程网格

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mesh

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

远程网格

func New

func New(info *proto.Mesh, proc abstract.Process) *Mesh

创建远程网格

func (*Mesh) Destroy

func (mesh *Mesh) Destroy()

销毁网格

func (*Mesh) Info

func (mesh *Mesh) Info() *proto.Mesh

网格信息

func (*Mesh) Insert

func (mesh *Mesh) Insert(nodes []*proto.Node)

插入节点

func (*Mesh) Mail

func (mesh *Mesh) Mail(mail *proto.Mail) error

发送邮件

func (*Mesh) Nodes

func (mesh *Mesh) Nodes() []*proto.Node

节点列表

func (*Mesh) Remove

func (mesh *Mesh) Remove(nodes []*proto.Node)

移除节点

func (*Mesh) Send

func (mesh *Mesh) Send(msg interface{}) error

发送消息

func (*Mesh) State

func (mesh *Mesh) State() (*proto.State, bool)

网格状态

func (*Mesh) UpdateSession

func (mesh *Mesh) UpdateSession(session session.Session)

更新网格连接

func (*Mesh) UpdateState

func (mesh *Mesh) UpdateState(state *proto.State)

更新网格状态

type Node

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

远程节点

func (*Node) Destroy

func (node *Node) Destroy()

销毁节点

func (*Node) Info

func (node *Node) Info() *proto.Node

节点信息

func (*Node) Mail

func (node *Node) Mail(mail *proto.Mail) error

发送邮件

func (*Node) Mesh

func (node *Node) Mesh() router.Mesh

节点所属网格

Jump to

Keyboard shortcuts

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