MCPcopy Create free account
hub / github.com/PostHog/duckgres / NewControllerWithClient

Function NewControllerWithClient

controlplane/provisioner/controller.go:94–101  ·  view source on GitHub ↗

NewControllerWithClient creates a Controller with a pre-built DucklingClient (for testing).

(store WarehouseStore, dc *DucklingClient, pollInterval time.Duration)

Source from the content-addressed store, hash-verified

92
93// NewController creates a provisioning controller. Returns an error if the
94// Kubernetes client cannot be initialized (e.g., not running in-cluster).
95func NewController(store WarehouseStore, pollInterval time.Duration) (*Controller, error) {
96 dc, err := NewDucklingClient()
97 if err != nil {
98 return nil, fmt.Errorf("create duckling client: %w", err)
99 }
100 return &Controller{
101 store: store,
102 duckling: dc,
103 pollInterval: pollInterval,
104 probe: ProbeMetadataStore,

Calls

no outgoing calls