node

package
v0.0.0-...-a85c11b Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeNodeHash

func MakeNodeHash(h string) string

func NewNodeService

func NewNodeService() (nodeApi, error)

Types

type NodeConfig

type NodeConfig struct {
	NodeHost   string    `json:"host"`
	NodePort   string    `json:"port"`
	NodeScheme string    `json:"scheme"`
	IsUp       bool      `json:"isUp"`
	Id         uuid.UUID `json:"id"`
}

func (NodeConfig) Host

func (c NodeConfig) Host() string

func (NodeConfig) Port

func (c NodeConfig) Port() int

func (NodeConfig) Scheme

func (c NodeConfig) Scheme() string

type NodeRepo

type NodeRepo interface {
	GetAllNodes(ctx context.Context) ([]NodeConfig, error)
	GetNode(ctx context.Context, nodeId uuid.UUID) (NodeConfig, error)
}

func NewNodeRepo

func NewNodeRepo() (NodeRepo, error)

Jump to

Keyboard shortcuts

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