config

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultRoot            = "/tb"
	DefaultP2PListenFormat = "/ip4/0.0.0.0/tcp/%d"
	DefaultHTTPListen      = "0.0.0.0:443"
)
View Source
var WaitForSwamDuration = 10 * time.Second

Functions

func NewLiteNode

func NewLiteNode(ctx context.Context, config *Node, storagePath string) (peer.Node, error)

func NewNode

func NewNode(ctx context.Context, config *Node, storagePath string) (peer.Node, error)

Types

type Bundle added in v1.1.1

type Bundle struct {
	Origin BundleOrigin `yaml:"origin"`
	Source
}

type BundleOrigin added in v1.1.1

type BundleOrigin struct {
	Shape     string    `yaml:"shape"`
	Host      string    `yaml:"host"`
	Creation  time.Time `yaml:"time"`
	Version   *string   `yaml:"version,omitempty"`
	Protected bool      `yaml:"protected,omitempty"`
}

type DVKey

type DVKey struct {
	Private string `yaml:"private"`
	Public  string `yaml:"public"`
}

type DomainValidation

type DomainValidation struct {
	PrivateKey []byte
	PublicKey  []byte
}

type Domains

type Domains struct {
	Key       DVKey    `yaml:"key"`
	Aliases   []string `yaml:"aliases"`
	Generated string   `yaml:"generated"`
}

type Node added in v1.0.5

type Node struct {
	Root     string
	Shape    string
	Services []string

	Peers           []string
	P2PListen       []string
	P2PAnnounce     []string
	Ports           map[string]int // TODO: use a struct
	Location        *seerIface.Location
	NetworkFqdn     string
	GeneratedDomain string
	AliasDomains    []string

	HttpListen string

	AliasDomainsRegExp    []*regexp.Regexp
	GeneratedDomainRegExp *regexp.Regexp
	ServicesDomainRegExp  *regexp.Regexp

	Node       peer.Node
	PrivateKey []byte
	Databases  kvdb.Factory

	ClientNode peer.Node

	SwarmKey []byte

	Http http.Service

	EnableHTTPS bool
	Verbose     bool
	DevMode     bool

	Plugins
	DomainValidation DomainValidation
}

func (*Node) Validate added in v1.0.5

func (config *Node) Validate() error

type Plugin

type Plugin string

type Plugins

type Plugins struct {
	Plugins []Plugin `yaml:"plugins,omitempty"`
}

type Ports added in v1.0.5

type Ports struct {
	Main int `yaml:"main"`
	Lite int `yaml:"lite,omitempty"`
	Ipfs int `yaml:"ipfs,omitempty"`
}

func (Ports) ToMap added in v1.0.5

func (p Ports) ToMap() map[string]int

type ProtoCommandIface

type ProtoCommandIface interface {
	New(context.Context, *Node) (serviceIface.Service, error)
}

type Source

type Source struct {
	Privatekey  string              `yaml:"privatekey"`
	Swarmkey    string              `yaml:"swarmkey"`
	Services    []string            `yaml:"services,omitempty"`
	P2PListen   []string            `yaml:"p2p-listen"`
	P2PAnnounce []string            `yaml:"p2p-announce"`
	Ports       Ports               `yaml:"ports"`
	Location    *seerIface.Location `yaml:"location,omitempty"`
	Peers       []string            `yaml:"peers,omitempty"`
	NetworkFqdn string              `yaml:"network-fqdn"`
	Domains     Domains             `yaml:"domains"`
	Plugins
}

Jump to

Keyboard shortcuts

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