clustering

package
v0.0.0-...-48715d7 Latest Latest
Warning

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

Go to latest
Published: May 4, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	Nodes []INode
}

func (Cluster) Locate

func (cluster Cluster) Locate(key string) INode

type EndPoint

type EndPoint struct {
	Address string
	Port    string
}

type ICluster

type ICluster interface {
	Locate(key string) INode
}

func CreateCluster

func CreateCluster(endPoints ...EndPoint) ICluster

type INode

type INode interface {
	SendCommand(cmd message.CommandOpCode, key string, body []byte) (result []byte, err error)
	Start(endPoint EndPoint)
}

type Node

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

func (*Node) SendCommand

func (node *Node) SendCommand(cmd message.CommandOpCode, key string, body []byte) (result []byte, err error)

func (*Node) Start

func (node *Node) Start(endPoint EndPoint)

Jump to

Keyboard shortcuts

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