internal

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HcloudFirewallRulesCompare added in v0.0.2

func HcloudFirewallRulesCompare(a, b []hcloud.FirewallRule) bool

func SlicesCompare

func SlicesCompare[T comparable](a, b []T) bool

func SlicesConcat

func SlicesConcat[T any](ins ...[]T) []T

func SlicesFlatMap

func SlicesFlatMap[I any, O any](in []I, fn func(elem I) []O) []O

func SlicesMap

func SlicesMap[I any, O any](in []I, fn func(elem I) O) []O

func ValuePointer

func ValuePointer[T any](value T) *T

func ValuePointerCompare

func ValuePointerCompare[T comparable](a, b *T) bool

func WriteFileIfChanged added in v0.0.2

func WriteFileIfChanged(name string, content []byte, perm fs.FileMode) (bool, error)

Types

type Logger

type Logger struct {
	Debug *log.Logger
	Info  *log.Logger
	Warn  *log.Logger
	Error *log.Logger
}

func NewLogger

func NewLogger(withDebug bool) Logger

type Service

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

func NewService

func NewService(ctx context.Context, logger Logger, opts ServiceOpts) (*Service, error)

func (*Service) ReconcileFirewall

func (s *Service) ReconcileFirewall() error

func (*Service) ReconcileHaproxy

func (s *Service) ReconcileHaproxy() error

func (*Service) ReconcileLoop

func (s *Service) ReconcileLoop(delay time.Duration, name string, fn func() error) error

func (*Service) RetrieveNodeIPv4s

func (s *Service) RetrieveNodeIPv4s(role string) ([]net.IP, []net.IP, error)

func (*Service) Run

func (s *Service) Run() error

func (*Service) RunHaproxy

func (s *Service) RunHaproxy()

type ServiceOpts

type ServiceOpts struct {
	HcloudToken  string
	ClusterName  string
	FirewallName string
}

Jump to

Keyboard shortcuts

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