utils

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareSlices

func CompareSlices(old, new []string) (added []string, deleted []string)

func MakeUnique

func MakeUnique(strings []string) []string

MakeUnique modifies original slice

func Wait

func Wait(ctx context.Context, condition func() bool, tick time.Duration) bool

Types

type AtomicBool

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

func NewAtomicBool

func NewAtomicBool(init bool) *AtomicBool

func (*AtomicBool) Get

func (b *AtomicBool) Get() bool

func (*AtomicBool) Set

func (b *AtomicBool) Set(value bool)

type RoundRobinStrings

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

func NewRoundRobinStrings

func NewRoundRobinStrings(strings []string) *RoundRobinStrings

func (*RoundRobinStrings) Get

func (u *RoundRobinStrings) Get() string

func (*RoundRobinStrings) Update

func (u *RoundRobinStrings) Update(strings []string)

Jump to

Keyboard shortcuts

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