registry

package
v0.0.0-...-ae71bc6 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCacheRequestHandler

func GetCacheRequestHandler(w http.ResponseWriter, r *http.Request)

GetCacheRequestHandler rest request handler

func SetRoutes

func SetRoutes(httpService *chi.Mux)

Set is used to set the routes

Types

type AtomicHostCache

type AtomicHostCache struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

AtomicHostCache atomic HostCache

func NewCache

func NewCache() *AtomicHostCache

NewCache create new Cache

func (*AtomicHostCache) GetCache

func (p *AtomicHostCache) GetCache() hosts.HostCache

GetCache get the current Cache

func (*AtomicHostCache) PutCache

func (p *AtomicHostCache) PutCache(ip string, host hosts.Host)

PutCache Add entry to Cache

type CacheBuilder

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

CacheBuilder initializes and updates host cache

func NewCacheBuilder

func NewCacheBuilder(apiserver string, kubeconfig string, updatePeriod int, wg *sync.WaitGroup) *CacheBuilder

NewCacheBuilder new CacheBuilder

func (*CacheBuilder) BuildCache

func (r *CacheBuilder) BuildCache() error

BuildCache build updated Cache

func (*CacheBuilder) StartCacheBuilder

func (r *CacheBuilder) StartCacheBuilder()

StartCacheBuilder run CacheBuilder

func (*CacheBuilder) StopCacheBuilder

func (r *CacheBuilder) StopCacheBuilder()

StopCacheBuilder stop CacheBuilder

type Server

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

Server http server wrapper

func NewServer

func NewServer(addr string, wg *sync.WaitGroup) *Server

NewServer new server

func (*Server) StartServer

func (s *Server) StartServer()

StartServer start server

func (*Server) StopServer

func (s *Server) StopServer()

StopServer stop server

Jump to

Keyboard shortcuts

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