environments

package
v1.0.63 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 8, 2026 License: BSD-2-Clause Imports: 13 Imported by: 0

Documentation

Overview

Package environments implements the environment discovery polling loop. It periodically queries the Plan42 API to determine which (GithubConnectionID, OrgName) pairs the runner should be polling GitHub for.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Client        *p42.Client
	TenantID      string
	RunnerID      string
	EventPoller   EventPoller
	ConnectionIdx map[string]*config.GithubInfo
}

Config holds the dependencies for the environment discovery poller.

type EventPoller

type EventPoller interface {
	UpdateTargets(desired map[githubevents.CheckpointKey]githubevents.ConnectionInfo)
}

EventPoller is the interface the github events poller must implement. Environment discovery calls UpdateTargets on each iteration with the desired set of polling pairs and their connection details.

type Poller

type Poller struct {
	// contains filtered or unexported fields
}

Poller implements the environment discovery polling loop.

func New

func New(cfg Config) *Poller

New creates and starts a new environment discovery Poller. The poller is fully running when returned.

func (*Poller) ShutdownContext

func (p *Poller) ShutdownContext(ctx context.Context) error

ShutdownContext cancels the discovery loop and waits for it to finish.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL