...

Source file src/sigs.k8s.io/cli-utils/pkg/apply/poller/poller.go

Documentation: sigs.k8s.io/cli-utils/pkg/apply/poller

     1  // Copyright 2020 The Kubernetes Authors.
     2  // SPDX-License-Identifier: Apache-2.0
     3  
     4  package poller
     5  
     6  import (
     7  	"context"
     8  
     9  	"sigs.k8s.io/cli-utils/pkg/kstatus/polling"
    10  	pollevent "sigs.k8s.io/cli-utils/pkg/kstatus/polling/event"
    11  	"sigs.k8s.io/cli-utils/pkg/object"
    12  )
    13  
    14  // Poller defines the interface the applier needs to poll for status of resources.
    15  // The context is the preferred way to shut down the poller.
    16  // The identifiers defines the resources which the poller should poll and
    17  // compute status for.
    18  // The options allows callers to override some of the settings of the poller,
    19  // like the polling frequency and the caching strategy.
    20  type Poller interface {
    21  	Poll(ctx context.Context, identifiers object.ObjMetadataSet, options polling.PollOptions) <-chan pollevent.Event
    22  }
    23  

View as plain text