cloud

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KNode

type KNode struct {
	Id   string // 节点ID(uuid)
	Host string // 节点Host
}

KNode KercyLAN节点实现

通常存储了一个节点的信息

func NewNode

func NewNode(host string) *KNode

NewNode 返回一个KNode实例

该函数创建一个不存在的节点后应该尽量将所得信息进行存储,因为它会拥有一个全新的ID。

func (*KNode) GetHost

func (slf *KNode) GetHost() string

func (*KNode) GetId

func (slf *KNode) GetId() string

type Node

type Node interface {
	// GetId 返回节点的id
	GetId() string
	// GetHost 返回节点的host
	GetHost() string
}

Node 一个计算机节点的程序行为定义

Jump to

Keyboard shortcuts

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