util

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareEndpointSpec

func CompareEndpointSpec(left, right subv1.EndpointSpec) bool

func CreateChainIfNotExists added in v0.1.0

func CreateChainIfNotExists(ipt *iptables.IPTables, table, chain string) error

func FlattenColors

func FlattenColors(colorCodes []string) string

func GetClusterCRDName

func GetClusterCRDName(cluster *types.SubmarinerCluster) (string, error)

func GetClusterIDFromCableName added in v0.0.2

func GetClusterIDFromCableName(cableName string) string

func GetDefaultGatewayInterface

func GetDefaultGatewayInterface() (*net.Interface, error)

func GetEndpointCRDName

func GetEndpointCRDName(endpoint *types.SubmarinerEndpoint) (string, error)

func GetEndpointCRDNameFromParams

func GetEndpointCRDNameFromParams(clusterID, cableName string) (string, error)

func GetLocalEndpoint

func GetLocalEndpoint(clusterID string, backend string, backendConfig map[string]string, natEnabled bool,
	subnets []string, privateIP string) (types.SubmarinerEndpoint, error)

func GetLocalIP

func GetLocalIP() string

func IsOverlappingCIDR added in v0.4.0

func IsOverlappingCIDR(cidrList []string, cidr string) (bool, error)

func ParseSecure

func ParseSecure(token string) (types.Secure, error)

func PrependUnique added in v0.1.0

func PrependUnique(ipt *iptables.IPTables, table string, chain string, ruleSpec []string) error

Types

type StringSet added in v0.0.2

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

func NewStringSet added in v0.0.2

func NewStringSet() *StringSet

func (*StringSet) Add added in v0.0.2

func (set *StringSet) Add(s string) bool

func (*StringSet) Contains added in v0.0.2

func (set *StringSet) Contains(s string) bool

func (*StringSet) Delete added in v0.0.2

func (set *StringSet) Delete(s string) bool

func (*StringSet) DeleteAll added in v0.4.0

func (set *StringSet) DeleteAll()

func (*StringSet) Elements added in v0.1.1

func (set *StringSet) Elements() []string

func (*StringSet) Size added in v0.0.2

func (set *StringSet) Size() int

Jump to

Keyboard shortcuts

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