Documentation ¶
Index ¶
- func ConsumeEvents(ctx context.Context, appClient SimplifiedApplicationServiceClient, ...) error
- type ArgoEvent
- type ArgoEventProcessor
- type Broadcast
- func (b *Broadcast) DisconnectAll()
- func (b *Broadcast) GetStatus(ctx context.Context, req *api.GetStatusRequest) (*api.GetStatusResponse, error)
- func (b *Broadcast) ProcessArgoEvent(ctx context.Context, ev ArgoEvent)
- func (b *Broadcast) ProcessKuberpultEvent(ctx context.Context, ev versions.KuberpultEvent)
- func (b *Broadcast) Start() ([]*BroadcastEvent, <-chan *BroadcastEvent, unsubscribe)
- func (b *Broadcast) StreamStatus(req *api.StreamStatusRequest, svc api.RolloutService_StreamStatusServer) error
- type BroadcastEvent
- type Dispatcher
- type Key
- type SimplifiedApplicationServiceClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConsumeEvents ¶
func ConsumeEvents(ctx context.Context, appClient SimplifiedApplicationServiceClient, dispatcher *Dispatcher, hlth *setup.HealthReporter) error
Types ¶
type ArgoEvent ¶
type ArgoEvent struct { Environment string Application string SyncStatusCode v1alpha1.SyncStatusCode HealthStatusCode health.HealthStatusCode OperationState *v1alpha1.OperationState Version *versions.VersionInfo }
type ArgoEventProcessor ¶
type Broadcast ¶
type Broadcast struct {
// contains filtered or unexported fields
}
func (*Broadcast) DisconnectAll ¶
func (b *Broadcast) DisconnectAll()
Disconnects all listeners. This is used in tests to check wheter subscribers handle reconnects
func (*Broadcast) GetStatus ¶
func (b *Broadcast) GetStatus(ctx context.Context, req *api.GetStatusRequest) (*api.GetStatusResponse, error)
func (*Broadcast) ProcessArgoEvent ¶
ProcessArgoEvent implements service.EventProcessor
func (*Broadcast) ProcessKuberpultEvent ¶
func (b *Broadcast) ProcessKuberpultEvent(ctx context.Context, ev versions.KuberpultEvent)
func (*Broadcast) Start ¶
func (b *Broadcast) Start() ([]*BroadcastEvent, <-chan *BroadcastEvent, unsubscribe)
func (*Broadcast) StreamStatus ¶
func (b *Broadcast) StreamStatus(req *api.StreamStatusRequest, svc api.RolloutService_StreamStatusServer) error
type BroadcastEvent ¶
type BroadcastEvent struct { Key EnvironmentGroup string Team string IsProduction *bool ArgocdVersion *versions.VersionInfo KuberpultVersion *versions.VersionInfo RolloutStatus api.RolloutStatus }
type Dispatcher ¶ added in v1.17.0
type Dispatcher struct {
// contains filtered or unexported fields
}
The dispatcher is responsible for enriching argo events with version data from kuberpult. It also maintains a backlog of applications where adding this data failed. The backlog is retried frequently so that missing data eventually can be resolved.
func NewDispatcher ¶ added in v1.17.0
func NewDispatcher(sink ArgoEventProcessor, vc versions.VersionClient) *Dispatcher
func (*Dispatcher) Dispatch ¶ added in v1.17.0
func (r *Dispatcher) Dispatch(ctx context.Context, k Key, ev *v1alpha1.ApplicationWatchEvent)
func (*Dispatcher) Work ¶ added in v1.17.0
func (r *Dispatcher) Work(ctx context.Context, hlth *setup.HealthReporter) error
type SimplifiedApplicationServiceClient ¶
type SimplifiedApplicationServiceClient interface {
Watch(ctx context.Context, qry *application.ApplicationQuery, opts ...grpc.CallOption) (application.ApplicationService_WatchClient, error)
}
this is a simpler version of ApplicationServiceClient from the application package
Click to show internal directories.
Click to hide internal directories.