tatanka

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: BlueOak-1.0.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const ErrNoPath = dex.ErrorKind("no path")

Variables

This section is empty.

Functions

This section is empty.

Types

type BootNode

type BootNode struct {
	// Protocol is one of ("ws", "wss"), though other tatanka comms protocols
	// may be implemented later. Or we may end up using e.g. go-libp2p.
	Protocol string
	PeerID   dex.Bytes
	// Config can take different forms depending on the comms protocol, but is
	// probably a tcp.RemoteNodeConfig.
	Config json.RawMessage
}

BootNode represents a configured boot node. Tatanka is whitelist only, and node operators are responsible for keeping their whitelist up to date.

type ChainConfig

type ChainConfig struct {
	Symbol string          `json:"symbol"`
	Config json.RawMessage `json:"config"`
}

ChainConfig is how the chain configuration is specified in the Tatanka configuration file.

type Config

type Config struct {
	Net        dex.Network
	DataDir    string
	Logger     dex.Logger
	RPC        comms.RPCConfig
	ConfigPath string

	// TODO: Change to whitelist
	WhiteList []BootNode

	FiatOracleConfig fiatrates.Config
}

Config is the configuration of the Tatanka.

type ConfigFile

type ConfigFile struct {
	Chains []ChainConfig `json:"chains"`
}

ConfigFile represents the JSON Tatanka configuration file.

type Tatanka

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

Tatanka is a server node on Tatanka Mesh. Tatanka implements two APIs, one for fellow tatanka nodes, and one for clients. The primary roles of a tatanka node are

  1. Maintain reputation information about client nodes.
  2. Distribute broadcasts and relay tankagrams.
  3. Provide some basic oracle services.

func New

func New(cfg *Config) (*Tatanka, error)

func (*Tatanka) Connect

func (t *Tatanka) Connect(ctx context.Context) (_ *sync.WaitGroup, err error)

type Topic

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

Directories

Path Synopsis
cmd
tcp

Jump to

Keyboard shortcuts

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