node

package
v0.0.0-...-47dfbc3 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Stop

func Stop(nodes []*Node) error

Types

type Environment

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

func NewEnvironment

func NewEnvironment() (*Environment, error)

func (*Environment) Stop

func (env *Environment) Stop() error

type Node

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

func New

func New(
	image string,
	Environment *Environment,
	opts ...Option,
) ([]*Node, error)

func (*Node) Address

func (n *Node) Address() string

Address returns the node's address

func (*Node) Logs

func (n *Node) Logs() (chan string, chan error)

Logs filters the node json logs for the specific tag

type Option

type Option func(*Options)

func WithCommand

func WithCommand(command []string) Option

func WithCount

func WithCount(count int) Option

func WithEnv

func WithEnv(env []string) Option

func WithName

func WithName(name string) Option

func WithPortMapping

func WithPortMapping(containerPort, nodePort int) Option

type Options

type Options struct {
	Name         string
	Count        int
	Env          []string
	Command      []string
	PortMappings map[int]int
}

Jump to

Keyboard shortcuts

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