Documentation ¶
Index ¶
- func NewConnection(natscred NatsCredential) (nc *nats.Conn, err error)
- type AuditEventCreator
- type BillingEventCreator
- type EventCreator
- type EventPublisher
- func (p *EventPublisher) ForGVK(informer Informer, gvk schema.GroupVersionKind)
- func (p *EventPublisher) NatsClient() (*nats.Conn, error)
- func (p *EventPublisher) Publish(ev *api.Event, et api.EventType) error
- func (p *EventPublisher) SetupSiteInfoPublisher(cfg *rest.Config, kc kubernetes.Interface, ...) error
- func (p *EventPublisher) SetupSiteInfoPublisherWithManager(mgr manager.Manager) error
- func (p *EventPublisher) SetupWithManager(ctx context.Context, mgr manager.Manager, obj client.Object) error
- func (p *EventPublisher) SetupWithManagerForKind(ctx context.Context, mgr manager.Manager, gvk schema.GroupVersionKind) error
- type Informer
- type NatsConfig
- type NatsCredential
- type ResourceEventPublisher
- type SiteInfoPublisher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConnection ¶
func NewConnection(natscred NatsCredential) (nc *nats.Conn, err error)
NewConnection creates a new NATS connection
Types ¶
type AuditEventCreator ¶
type AuditEventCreator struct {
Mapper discovery.ResourceMapper
}
func (*AuditEventCreator) CreateEvent ¶
type BillingEventCreator ¶
type BillingEventCreator struct { Mapper discovery.ResourceMapper ClusterMetadata *kmapi.ClusterMetadata }
func (*BillingEventCreator) CreateEvent ¶
type EventPublisher ¶
type EventPublisher struct {
// contains filtered or unexported fields
}
func NewEventPublisher ¶
func NewEventPublisher( nats *NatsConfig, mapper discovery.ResourceMapper, fn EventCreator, ) *EventPublisher
func NewResilientEventPublisher ¶ added in v0.0.3
func NewResilientEventPublisher( fnConnect func() (*NatsConfig, error), mapper discovery.ResourceMapper, fnCreateEvent EventCreator, ) *EventPublisher
func (*EventPublisher) ForGVK ¶ added in v0.0.3
func (p *EventPublisher) ForGVK(informer Informer, gvk schema.GroupVersionKind)
func (*EventPublisher) NatsClient ¶ added in v0.0.12
func (p *EventPublisher) NatsClient() (*nats.Conn, error)
func (*EventPublisher) SetupSiteInfoPublisher ¶ added in v0.0.8
func (p *EventPublisher) SetupSiteInfoPublisher(cfg *rest.Config, kc kubernetes.Interface, factory informers.SharedInformerFactory) error
func (*EventPublisher) SetupSiteInfoPublisherWithManager ¶ added in v0.0.11
func (p *EventPublisher) SetupSiteInfoPublisherWithManager(mgr manager.Manager) error
func (*EventPublisher) SetupWithManager ¶
func (*EventPublisher) SetupWithManagerForKind ¶
func (p *EventPublisher) SetupWithManagerForKind(ctx context.Context, mgr manager.Manager, gvk schema.GroupVersionKind) error
type Informer ¶ added in v0.0.28
type Informer interface { // AddEventHandlerWithResyncPeriod adds an event handler to the shared informer using the // specified resync period. Events to a single handler are delivered sequentially, but there is // no coordination between different handlers. AddEventHandlerWithResyncPeriod(handler cache.ResourceEventHandler, resyncPeriod time.Duration) (cache.ResourceEventHandlerRegistration, error) }
Informer - informer allows you interact with the underlying informer.
type NatsConfig ¶
type NatsConfig struct { LicenseID string `json:"licenseID"` Subject string `json:"natsSubject"` Server string `json:"natsServer"` Client *nats.Conn `json:"-"` }
func NewNatsConfig ¶
type NatsCredential ¶
type NatsCredential struct { NatsConfig `json:",inline,omitempty"` Credential []byte `json:"credential"` }
NatsCredential represents the api response of the register licensed user api
type ResourceEventPublisher ¶ added in v0.0.3
type ResourceEventPublisher struct {
// contains filtered or unexported fields
}
func (*ResourceEventPublisher) OnAdd ¶ added in v0.0.3
func (p *ResourceEventPublisher) OnAdd(o interface{}, isInInitialList bool)
func (*ResourceEventPublisher) OnDelete ¶ added in v0.0.3
func (p *ResourceEventPublisher) OnDelete(obj interface{})
func (*ResourceEventPublisher) OnUpdate ¶ added in v0.0.3
func (p *ResourceEventPublisher) OnUpdate(oldObj, newObj interface{})
type SiteInfoPublisher ¶ added in v0.0.31
type SiteInfoPublisher struct {
// contains filtered or unexported fields
}
func (*SiteInfoPublisher) OnAdd ¶ added in v0.0.31
func (p *SiteInfoPublisher) OnAdd(o interface{}, isInInitialList bool)
func (*SiteInfoPublisher) OnDelete ¶ added in v0.0.31
func (p *SiteInfoPublisher) OnDelete(obj interface{})
func (*SiteInfoPublisher) OnUpdate ¶ added in v0.0.31
func (p *SiteInfoPublisher) OnUpdate(oldObj, newObj interface{})
Click to show internal directories.
Click to hide internal directories.