yurt

package module
v0.0.0-...-b274fa0 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertificateMaker

type CertificateMaker interface {
	// MakeCertificate returns a certificate for the given hostname.  The
	// hostname and IP address are both optional, but typically provide
	// additional security.
	MakeCertificate(ctx context.Context, hostname, ip string) (*pki.TLSConfigPEM, error)
}

CertificateMaker makes TLS certificates appropriate for a particular use case. We are agnostic as to how they are stored and distributed, their lifetime, or what fields are stored.

type NetworkConfig

type NetworkConfig struct {
	Network       sockaddr.SockAddr
	DockerNetName string
}

type Node

type Node struct {
	// Name is the node name, which may mean different things to different
	// services.  May also be the host name for some drivers.  May also be
	// resolvable with some drivers, though not necessarily by the cluster
	// creating code.
	Name  string
	Ports Ports
	Host  string
	TLS   *pki.TLSConfigPEM
}

A Node describes a service instance, typically a member or future member of a cluster. The Node may not yet exist. Multiple nodes of different types may map to the same host, e.g. a host might run both Consul and Nomad, and may use different TLS for each.

func (Node) Address

func (n Node) Address(name string) (string, error)

Address returns the host:port address of a service running on the node.

type Port

type Port struct {
	Number int
	Type   PortNetworkType
}

func (Port) AsList

func (p Port) AsList() []string

type PortNetworkType

type PortNetworkType int
const TCPAndUDP PortNetworkType = 2
const TCPOnly PortNetworkType = 0
const UDPOnly PortNetworkType = 1

type Ports

type Ports struct {
	Kind string
	// ByName is a map from port name (e.g. "http", "rpc") to port.
	ByName map[string]Port
	// NameOrder specifies the order to assign ports sequentially
	NameOrder []string
}

func (Ports) AsList

func (p Ports) AsList() []string

func (Ports) Sequential

func (p Ports) Sequential(firstPort int) Ports

Directories

Path Synopsis
binaries fetches "binaries" from URLs, decompresses/extracts them if the URL points to an archive like a zip, and provides a path to the binary named after the package.
binaries fetches "binaries" from URLs, decompresses/extracts them if the URL points to an archive like a zip, and provides a path to the binary named after the package.
cmd
helper

Jump to

Keyboard shortcuts

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