Documentation ¶
Index ¶
- Constants
- Variables
- func AssignAddress(ipNet *net.IPNet, usedIPs []net.IPNet) (ip net.IP, err error)
- func Backoff(once func() (resetBackoff bool, err error), ...) error
- func Notify(state string) (err error)
- func ParseCIDR(s string) (net.IPNet, error)
- func SetupLog()
- func ShowCurrent()
- type Base64Bytes
- type HexBytes
- type Token
- func (t *Token) Empty() bool
- func (t *Token) GobDecode(data []byte) error
- func (t *Token) GobEncode() ([]byte, error)
- func (t *Token) Hash() *TokenHash
- func (t *Token) MarshalJSON() ([]byte, error)
- func (t *Token) MarshalYAML() (interface{}, error)
- func (t *Token) String() string
- func (t *Token) UnmarshalJSON(data []byte) error
- func (t *Token) UnmarshalYAML(value *yaml.Node) error
- type TokenHash
- func (h *TokenHash) GobDecode(data []byte) error
- func (h *TokenHash) GobEncode() ([]byte, error)
- func (h *TokenHash) MarshalJSON() ([]byte, error)
- func (h *TokenHash) MarshalYAML() (interface{}, error)
- func (h *TokenHash) String() string
- func (h *TokenHash) UnmarshalJSON(data []byte) error
- func (h *TokenHash) UnmarshalYAML(value *yaml.Node) error
Constants ¶
const OnceTimeout = 10 * time.Second
OnceTimeout is the general timeout used for network requests (the request inside a backoff once function).
Variables ¶
var ErrAddressOverflow = errors.New("overflowed network")
var ErrEndBackoff = errors.New("internal: end backoff")
var L *zap.Logger
var S *zap.SugaredLogger
Functions ¶
func AssignAddress ¶
func ShowCurrent ¶
func ShowCurrent()
Types ¶
type Base64Bytes ¶
type Base64Bytes []byte
Base64Bytes is a byte slice with methods for (un)marshalling to YAML (using base64.StdEncoding).
func (*Base64Bytes) MarshalYAML ¶
func (b *Base64Bytes) MarshalYAML() (interface{}, error)
MarshalYAML implements yaml.Marshaler.
func (*Base64Bytes) UnmarshalYAML ¶
func (b *Base64Bytes) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML implements yaml.Unmarshaler.
type HexBytes ¶
type HexBytes []byte
HexBytes is a byte slice with methods for (un)marshalling to YAML (using hex).
func (*HexBytes) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (*HexBytes) MarshalYAML ¶
MarshalYAML implements yaml.Marshaler.
func (*HexBytes) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
func (*HexBytes) UnmarshalYAML ¶
UnmarshalYAML implements yaml.Unmarshaler.
type Token ¶
type Token struct {
// contains filtered or unexported fields
}
func ParseToken ¶
func RandomToken ¶
func (*Token) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (*Token) MarshalYAML ¶
MarshalYAML implements yaml.Marshaler.
func (*Token) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
func (*Token) UnmarshalYAML ¶
UnmarshalYAML implements yaml.Unmarshaler.
type TokenHash ¶
type TokenHash struct {
// contains filtered or unexported fields
}
func ParseTokenHash ¶
func (*TokenHash) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (*TokenHash) MarshalYAML ¶
MarshalYAML implements yaml.Marshaler.
func (*TokenHash) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
func (*TokenHash) UnmarshalYAML ¶
UnmarshalYAML implements yaml.Unmarshaler.