utils

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2020 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPrivateIPIfAvailable

func GetPrivateIPIfAvailable() net.IP

GetPrivateIPIfAvailable returns a private IP core, or unspecified IP (0.0.0.0) if no IP is available

func MapToProtoStruct

func MapToProtoStruct(m map[string]interface{}) (*structpb.Struct, error)

func MustMapToProtoStruct

func MustMapToProtoStruct(m map[string]interface{}) *structpb.Struct

func TlsConfig

func TlsConfig(certBytes, keyBytes, caBytes []byte) (*tls.Config, error)

func TlsConfigFromDir

func TlsConfigFromDir(certDir string) (*tls.Config, error)

func ValueToStructValue

func ValueToStructValue(v interface{}) (*structpb.Value, error)

Types

type NodeConfig

type NodeConfig struct {
	NodeID string

	// Namespace defaults to 'default'
	Namespace string

	// Workload defaults to 'test'
	Workload string

	// NodeType defaults to 'sidecar'. 'ingress' and 'router' are also supported.
	NodeType string

	// IP is currently the primary key used to locate inbound configs. It is sent by client,
	// must match a known endpoint IP. Tests can use a ServiceEntry to register fake IPs.
	IP string

	// Cluster defaults to 'svc.cluster.local'
	Cluster string

	// Metadata includes additional metadata for the node
	Metadata map[string]interface{}
}

NodeConfig for the Client connection.

func (*NodeConfig) ID added in v0.2.0

func (c *NodeConfig) ID() string

func (*NodeConfig) Meta added in v0.2.0

func (c *NodeConfig) Meta() *structpb.Struct

Jump to

Keyboard shortcuts

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