cdn

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFreePort added in v1.2.0

func GetFreePort() (int, error)

func GetOutboundIP added in v1.2.0

func GetOutboundIP() (string, error)

Types

type Directory added in v1.2.0

type Directory struct {
	Name string
	Path string
	Port int
}

func NewDirectoryFrom added in v1.2.0

func NewDirectoryFrom(binding string) (Directory, error)

type Manager

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

func New

func New() (*Manager, error)

func (*Manager) Bind added in v1.2.0

func (m *Manager) Bind(dir Directory) 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, error)

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