Documentation ¶
Overview ¶
Package srv provides server connectivity for loadbalanceroperator
Index ¶
- Constants
- Variables
- func NewRunner(ctx context.Context, tr taskRunner) *runner
- type Message
- type Server
- func (s *Server) CreateNamespace(ctx context.Context, hash string) (*v1.Namespace, error)
- func (s Server) LoadBalancerStatusUpdate(ctx context.Context, loadBalancerID gidx.PrefixedID, ...) error
- func (s *Server) Routes(g *echo.Group)
- func (s *Server) Run(ctx context.Context) error
- func (s *Server) Shutdown() error
Constants ¶
View Source
const (
LBPrefix = "loadbal"
)
Variables ¶
View Source
var ( // ErrPortsRequired is returned when a healthcheck port has not been provided ErrPortsRequired = errors.New("no ports provided") )
Functions ¶
Types ¶
type Message ¶
type Message interface { events.EventMessage | events.ChangeMessage GetTraceContext(ctx context.Context) context.Context GetEventType() string GetSubject() gidx.PrefixedID GetAddSubjects() []gidx.PrefixedID }
type Server ¶
type Server struct { APIClient *lbapi.Client BackoffConfig backoff.Policy IPAMClient *ipamclient.Client MetadataClient *metadata.Client Echo *echox.Server Context context.Context EventsConnection events.Connection Logger *zap.SugaredLogger KubeClient *rest.Config Debug bool EventTopics []string ChangeTopics []string Chart *chart.Chart ChartPath string ValuesPath string Locations []string ServicePortKey string ContainerPortKey string MetricsPort int LoadBalancers map[string]*runner // contains filtered or unexported fields }
Server holds options for server connectivity and settings
func (*Server) CreateNamespace ¶
CreateNamespace creates namespaces for the specified group that is provided in the event received
func (Server) LoadBalancerStatusUpdate ¶ added in v0.2.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
Click to show internal directories.
Click to hide internal directories.