Documentation ¶
Index ¶
- Constants
- type ControllerMetrics
- func (im *ControllerMetrics) DeleteIngress(ingKey string)
- func (im *ControllerMetrics) DeleteNegService(svcKey string)
- func (im *ControllerMetrics) Run(stopCh <-chan struct{})
- func (im *ControllerMetrics) SetIngress(ingKey string, ing IngressState)
- func (im *ControllerMetrics) SetNegService(svcKey string, negState NegServiceState)
- type IngressMetricsCollector
- type IngressState
- type NegMetricsCollector
- type NegServiceState
Constants ¶
const GLBC_NAMESPACE = "glbc"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ControllerMetrics ¶ added in v1.8.2
ControllerMetrics contains the state of the all ingresses.
func NewControllerMetrics ¶ added in v1.8.2
func NewControllerMetrics() *ControllerMetrics
NewControllerMetrics initializes ControllerMetrics and starts a go routine to compute and export metrics periodically.
func (*ControllerMetrics) DeleteIngress ¶ added in v1.8.2
func (im *ControllerMetrics) DeleteIngress(ingKey string)
DeleteIngress implements IngressMetricsCollector.
func (*ControllerMetrics) DeleteNegService ¶ added in v1.8.2
func (im *ControllerMetrics) DeleteNegService(svcKey string)
DeleteIngress implements NegMetricsCollector.
func (*ControllerMetrics) Run ¶ added in v1.8.2
func (im *ControllerMetrics) Run(stopCh <-chan struct{})
func (*ControllerMetrics) SetIngress ¶ added in v1.8.2
func (im *ControllerMetrics) SetIngress(ingKey string, ing IngressState)
SetIngress implements IngressMetricsCollector.
func (*ControllerMetrics) SetNegService ¶ added in v1.8.2
func (im *ControllerMetrics) SetNegService(svcKey string, negState NegServiceState)
SetIngress implements NegMetricsCollector.
type IngressMetricsCollector ¶ added in v1.8.2
type IngressMetricsCollector interface { // SetIngress adds/updates ingress state for given ingress key. SetIngress(ingKey string, ing IngressState) // DeleteIngress removes the given ingress key. DeleteIngress(ingKey string) }
IngressMetricsCollector is an interface to update/delete ingress states in the cache that is used for computing ingress usage metrics.
type IngressState ¶ added in v1.8.2
type IngressState struct {
// contains filtered or unexported fields
}
IngressState defines an ingress and its associated service ports.
func NewIngressState ¶ added in v1.8.2
func NewIngressState(ing *v1beta1.Ingress, svcPorts []utils.ServicePort) IngressState
NewIngressState returns ingress state for given ingress and service ports.
type NegMetricsCollector ¶ added in v1.8.2
type NegMetricsCollector interface { // SetNegService adds/updates neg state for given service key. SetNegService(svcKey string, negState NegServiceState) // DeleteNegService removes the given service key. DeleteNegService(svcKey string) }
NegMetricsCollector is an interface to update/delete Neg states in the cache that is used for computing neg usage metrics.
type NegServiceState ¶ added in v1.8.2
type NegServiceState struct { // standaloneNeg is the count of standalone NEG StandaloneNeg int // ingressNeg is the count of NEGs created for ingress IngressNeg int // asmNeg is the count of NEGs created for ASM AsmNeg int }
NegServiceState contains all the neg usage associated with one service