server

package
v0.0.0-...-d4ea4b3 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "v0.1.2"

Variables

View Source
var KubeVersionMinimum = Kube{
	Version: KVersion{
		Major: 1,
		Minor: 22,
	},
}

Functions

This section is empty.

Types

type Cache

type Cache struct {
	Mementos []Memento
	// contains filtered or unexported fields
}

func NewCache

func NewCache() *Cache

type Deployment

type Deployment struct {
	Name     string
	Replicas int
}

type J8a

type J8a struct {
	Version      string
	Image        string
	Namespace    string
	IngressClass string
	Deployment   Deployment
	Service      string
	Pod          Pod
}

type KLoggerWrapper

type KLoggerWrapper struct {
	Prefix string
}

func (*KLoggerWrapper) Errorf

func (k *KLoggerWrapper) Errorf(msg string, vals ...interface{})

func (*KLoggerWrapper) Fatalf

func (k *KLoggerWrapper) Fatalf(msg string, vals ...interface{})

func (*KLoggerWrapper) Info

func (k *KLoggerWrapper) Info(msg string)

func (*KLoggerWrapper) Infof

func (k *KLoggerWrapper) Infof(msg string, vals ...interface{})

type KVersion

type KVersion struct {
	Major int
	Minor int
}

type Kube

type Kube struct {
	Client  kubernetes.Interface
	Config  *rest.Config
	Version KVersion
}

type Logger

type Logger interface {
	Info(msg string)
	Infof(msg string, vals ...interface{})
	Errorf(msg string, vals ...interface{})
	Fatalf(msg string, vals ...interface{})
}

func NewKLoggerWrapper

func NewKLoggerWrapper() Logger

type Memento

type Memento struct {
	Routes      []Route
	Hash        string
	DateCreated time.Time
}

func NewMemento

func NewMemento() *Memento

func (*Memento) Clone

func (m *Memento) Clone() *Memento

func (*Memento) SetHash

func (m *Memento) SetHash()

type Option

type Option string
const (
	TestNoExit Option = "testNoExit"
)

type Pod

type Pod struct {
	Name  string
	Label map[string]string
}

type Route

type Route struct {
	Path     string
	Host     string
	PathType string
	Resource string
}

func NewRoute

func NewRoute() *Route

func NewRouteFrom

func NewRouteFrom(path string, host string, pathType *netv1.PathType, resource string) *Route

func (*Route) String

func (r *Route) String() string

creates an indented yaml string

type Server

type Server struct {
	Version string
	Kube    *Kube
	J8a     *J8a
	Log     Logger
	Options map[Option]Option
	Cache   *Cache
}

func NewServer

func NewServer(options ...Option) *Server

TODO: this method contains a lot of defaults

func (*Server) Bootstrap

func (s *Server) Bootstrap() *Server

func (*Server) Daemon

func (s *Server) Daemon()

func (*Server) FetchBackendServicePort

func (s *Server) FetchBackendServicePort(ib netv1.IngressBackend) (string, error)

Jump to

Keyboard shortcuts

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