Documentation ¶
Index ¶
- type SensuClient
- func (s *SensuClient) AddAsset(asset *v1beta1.SensuAsset) error
- func (s *SensuClient) AddCheckConfig(c *v1beta1.SensuCheckConfig) error
- func (s *SensuClient) AddEventFilter(filter *v1beta1.SensuEventFilter) error
- func (s *SensuClient) AddHandler(handler *v1beta1.SensuHandler) error
- func (s *SensuClient) AddNode(node *corev1.Node) error
- func (s *SensuClient) DeleteAsset(asset *v1beta1.SensuAsset) error
- func (s *SensuClient) DeleteCheckConfig(c *v1beta1.SensuCheckConfig) error
- func (s *SensuClient) DeleteEventFilter(filter *v1beta1.SensuEventFilter) error
- func (s *SensuClient) DeleteHandler(handler *v1beta1.SensuHandler) error
- func (s *SensuClient) DeleteNode(nodeName string) error
- func (s *SensuClient) GetNode(nodeName string) (string, error)
- func (s *SensuClient) ListEntities(namespace string) ([]types.Entity, error)
- func (s *SensuClient) SetTimeout(t time.Duration)
- func (s *SensuClient) UpdateAsset(asset *v1beta1.SensuAsset) error
- func (s *SensuClient) UpdateCheckConfig(c *v1beta1.SensuCheckConfig) error
- func (s *SensuClient) UpdateEventFilter(filter *v1beta1.SensuEventFilter) error
- func (s *SensuClient) UpdateHandler(handler *v1beta1.SensuHandler) error
- func (s *SensuClient) UpdateNode(node *corev1.Node) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SensuClient ¶
type SensuClient struct {
// contains filtered or unexported fields
}
SensuClient is the sensu client used to interact with a sensu server within a kubernetes cluster, within a certain k8s namespace
NOTE: ** this is tied to a sensu namespace, so a new SensuClient is needed
between sensu namespaces **
TODO: add a factory method that returns a sensuclient, and allows easy switching of sensu namespaces
func New ¶
func New(clusterName, namespace string, sensuNamespace string) *SensuClient
New will return a new SensuClient tied to a specific cluster within a k8s namespace, and tied to a specific sensu namespace.
func (*SensuClient) AddAsset ¶
func (s *SensuClient) AddAsset(asset *v1beta1.SensuAsset) error
AddAsset will add a new sensu Asset to the sensu server
func (*SensuClient) AddCheckConfig ¶
func (s *SensuClient) AddCheckConfig(c *v1beta1.SensuCheckConfig) error
AddCheckConfig will add a new sensu checkconfig to the sensu server
func (*SensuClient) AddEventFilter ¶
func (s *SensuClient) AddEventFilter(filter *v1beta1.SensuEventFilter) error
AddEventFilter will add a new sensu EventFilter to the sensu server
func (*SensuClient) AddHandler ¶
func (s *SensuClient) AddHandler(handler *v1beta1.SensuHandler) error
AddHandler will add a new sensu Handler to the sensu server
func (*SensuClient) AddNode ¶
func (s *SensuClient) AddNode(node *corev1.Node) error
AddNode will do nothing on a k8s node being added/updated/reconciled, for now
func (*SensuClient) DeleteAsset ¶
func (s *SensuClient) DeleteAsset(asset *v1beta1.SensuAsset) error
DeleteAsset will delete an existing Asset from the sensu server
func (*SensuClient) DeleteCheckConfig ¶
func (s *SensuClient) DeleteCheckConfig(c *v1beta1.SensuCheckConfig) error
DeleteCheckConfig will delete an existing checkconfig from the sensu server
func (*SensuClient) DeleteEventFilter ¶
func (s *SensuClient) DeleteEventFilter(filter *v1beta1.SensuEventFilter) error
DeleteEventFilter will delete an existing EventFilter from the sensu server
func (*SensuClient) DeleteHandler ¶
func (s *SensuClient) DeleteHandler(handler *v1beta1.SensuHandler) error
DeleteHandler will delete an existing Handler from the sensu server
func (*SensuClient) DeleteNode ¶
func (s *SensuClient) DeleteNode(nodeName string) error
DeleteNode will ensure that sensu entities associated with this k8s node are cleaned up
func (*SensuClient) GetNode ¶
func (s *SensuClient) GetNode(nodeName string) (string, error)
GetNode will list an entitiy from sensu
func (*SensuClient) ListEntities ¶
func (s *SensuClient) ListEntities(namespace string) ([]types.Entity, error)
ListEntities will list all the entities in sensu namespace
func (*SensuClient) SetTimeout ¶
func (s *SensuClient) SetTimeout(t time.Duration)
SetTimeout will set the timeout for sensu cluster api operations
func (*SensuClient) UpdateAsset ¶
func (s *SensuClient) UpdateAsset(asset *v1beta1.SensuAsset) error
UpdateAsset will add a new sensu Asset to the sensu server
func (*SensuClient) UpdateCheckConfig ¶
func (s *SensuClient) UpdateCheckConfig(c *v1beta1.SensuCheckConfig) error
UpdateCheckConfig will add a new sensu checkconfig to the sensu server
func (*SensuClient) UpdateEventFilter ¶
func (s *SensuClient) UpdateEventFilter(filter *v1beta1.SensuEventFilter) error
UpdateEventFilter will add a new sensu EventFilter to the sensu server
func (*SensuClient) UpdateHandler ¶
func (s *SensuClient) UpdateHandler(handler *v1beta1.SensuHandler) error
UpdateHandler will add a new sensu Handler to the sensu server
func (*SensuClient) UpdateNode ¶
func (s *SensuClient) UpdateNode(node *corev1.Node) error
UpdateNode will do nothing on a k8s node being added/updated/reconciled, for now