proto

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: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Headers

type Headers map[string]interface{}

type Mail

type Mail struct {
	ID      MailID   `json:"id"`
	Headers Headers  `json:"header,omitempty"`
	From    []*Node  `json:"from,omitempty"`
	Type    NodeType `json:"type,omitempty"`
	To      []*Node  `json:"to,omitempty"`
	Reply   RpcID    `json:"reply,omitempty"`
	Body    []byte   `json:"body"`
}

type MailID

type MailID string

type Mesh

type Mesh struct {
	ID   MeshID `json:"id"`   // ID
	Addr string `json:"addr"` // 侦听地址

}

type MeshID

type MeshID string

type MeshJoin

type MeshJoin struct {
	Mesh *Mesh `json:"mesh"`
}

type MeshQuit

type MeshQuit struct {
	ID MeshID `json:"id"`
}

type Node

type Node struct {
	ID   NodeID   `json:"id"`
	Type NodeType `json:"type"`
	Key  NodeKey  `json:"key"`
}

type NodeID

type NodeID string

type NodeJoin

type NodeJoin struct {
	Nodes []*Node `json:"nodes,omitempty"`
	State *State  `json:"state,omitempty"`
}

type NodeKey

type NodeKey string

type NodeQuit

type NodeQuit struct {
	Nodes []*Node `json:"nodes,omitempty"`
	State *State  `json:"state,omitempty"`
}

type NodeType

type NodeType string
const (
	EmptyNodeType NodeType = ""
)

type RpcID

type RpcID MailID
const EmptyRpcID RpcID = ""

type State

type State struct {
	Version Version `json:"version"`
	Credit  int64   `json:"credit"`
}

type Version

type Version int64

Jump to

Keyboard shortcuts

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