services

package
v0.0.0-...-8018142 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: MPL-2.0 Imports: 9 Imported by: 6

README

services

GoDoc

Documentation

Overview

Package services contains miscellaneous configuration validation for service names and IP addresses registered with Consul

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetIP

func GetIP(specList []string) (string, error)

GetIP determines the IP address of the container

func IPFromInterfaces

func IPFromInterfaces(raw interface{}) (string, error)

IPFromInterfaces ...

func ValidateName

func ValidateName(name string) error

ValidateName checks if the service name passed as an argument is is alpha-numeric with dashes. This ensures compliance with both DNS and discovery backends.

Types

type ByInterfaceThenIP

type ByInterfaceThenIP []interfaceIP

ByInterfaceThenIP implements the Sort with the following properties: 1. Sort interfaces alphabetically 2. Sort IPs by bytes (normalized to 16 byte form)

func (ByInterfaceThenIP) Len

func (se ByInterfaceThenIP) Len() int

func (ByInterfaceThenIP) Less

func (se ByInterfaceThenIP) Less(i, j int) bool

func (ByInterfaceThenIP) Swap

func (se ByInterfaceThenIP) Swap(i, j int)

Jump to

Keyboard shortcuts

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