mpc

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// ServerPIDs maps remote server address:port to remote server PID
	ServerPIDs map[netip.AddrPort]PID

	// PIDClients maps remote client PID to local server address:port
	PIDClients map[PID][]netip.AddrPort

	// PeerPIDs is a list of all remote PIDs that are
	// either clients or servers for the local PID
	PeerPIDs []PID

	LocalPID PID
	Threads  int
}

func ParseConfig

func ParseConfig(configPath string, localPID PID) (c *Config, err error)

ParseConfig parses MPC TOML config file, and pre-calculates address <-> PID mappings for easy lookup.

func (*Config) IsClient

func (c *Config) IsClient(peerPID PID) bool

type PID

type PID int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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