server

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package server provides the main server and processing functionality for the load balancer provider

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	APIClient             *lbapi.Client
	IPAMClient            *ipamclient.Client
	MetadataClient        *metadata.Client
	Context               context.Context
	Debug                 bool
	Echo                  *echox.Server
	IPBlock               string
	Locations             []string
	Logger                *zap.SugaredLogger
	Publisher             *events.Publisher
	EventsConnection      events.Connection
	ChangeTopics          []string
	MaxProcessMsgAttempts uint64

	ChangeChannels []<-chan events.Message[events.ChangeMessage]
}

Server holds options for server connectivity and settings

func (*Server) ConfigureSubscribers

func (s *Server) ConfigureSubscribers() error

func (*Server) GetLocation added in v0.0.10

func (s *Server) GetLocation(subjs []gidx.PrefixedID) gidx.PrefixedID

func (*Server) ListenChanges added in v0.0.11

func (s *Server) ListenChanges(messages <-chan events.Message[events.ChangeMessage])

func (Server) LoadBalancerStatusUpdate added in v0.1.0

func (s Server) LoadBalancerStatusUpdate(ctx context.Context, loadBalancerID gidx.PrefixedID, status *metastatus.LoadBalancerStatus) error

LoadBalancerStatusUpdate updates the state of a load balancer in the metadata service

func (*Server) LocationCheck

func (s *Server) LocationCheck(i gidx.PrefixedID) bool

func (*Server) Run

func (s *Server) Run(ctx context.Context) error

Run will start the server queue connections and healthcheck endpoints

Jump to

Keyboard shortcuts

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