Documentation ¶
Overview ¶
Package server provides the coordination logic for kured-silencer
Index ¶
- Variables
- func ValidateURL(u *url.URL) error
- type Client
- type Server
- func (srv Server) EventHandler(ctx context.Context, event watch.Event) error
- func (srv Server) GetKubeClient() kubernetes.Interface
- func (srv *Server) Run(ctx context.Context)
- func (srv Server) WithLogger(_ context.Context, logger *zap.SugaredLogger) *Server
- func (srv Server) WithSilenceDuration(_ context.Context, d time.Duration) *Server
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrMissingHost is returned when the URL is missing a scheme ErrMissingHost = errors.New("missing host") // ErrInvalidScheme is returned when the URL has an invalid scheme ErrInvalidScheme = errors.New("invalid scheme") // ErrMissingNode is returned when the node a label is deleted from is not found ErrMissingNode = errors.New("missing node") // ErrNodeNotReady is returned when the node is not ready ErrNodeNotReady = errors.New("node not ready") // ErrNodeUnschedulable is returned when the node is unschedulable ErrNodeUnschedulable = errors.New("node unschedulable") )
Functions ¶
func ValidateURL ¶
ValidateURL ensures that a valid url with both scheme and host is provided
Types ¶
type Client ¶
type Client struct { KubeClient kubernetes.Interface AMClient *client.AlertmanagerAPI }
Client is a struct container the kubernetes and alertmanager clients
type Server ¶
type Server struct { Client *Client // contains filtered or unexported fields }
Server contains settings for kured-silencer
func (Server) EventHandler ¶
EventHandler provides logic for handling node label event types
func (Server) GetKubeClient ¶
func (srv Server) GetKubeClient() kubernetes.Interface
GetKubeClient returns the kubernetes client from the running server
func (Server) WithLogger ¶
WithLogger sets the logger for the server
Click to show internal directories.
Click to hide internal directories.