cdn

package
v1.0.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

func New

func New() (*Manager, error)

func (*Manager) Add

func (m *Manager) Add(node *Node) error

func (*Manager) Endpoints

func (m *Manager) Endpoints() map[string]string

func (*Manager) IsRunning

func (m *Manager) IsRunning() bool

func (*Manager) Start

func (m *Manager) Start(ctx context.Context) error

func (*Manager) Stop

func (m *Manager) Stop(ctx context.Context) error

type Node

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

func NewNode

func NewNode(settings NodeSettings) *Node

func (*Node) ID

func (n *Node) ID() int

func (*Node) IsRunning

func (n *Node) IsRunning() bool

func (*Node) Name

func (n *Node) Name() string

func (*Node) Port

func (n *Node) Port() int

func (*Node) Start

func (n *Node) Start(_ context.Context) error

func (*Node) Stop

func (n *Node) Stop(ctx context.Context) error

func (*Node) String

func (n *Node) String() string

type NodeSettings

type NodeSettings struct {
	Name   string
	Port   int
	Dir    string
	Prefix string
}

Jump to

Keyboard shortcuts

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