Help us shape the future of Go! Take the 2026 Go Developer Survey

controller

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const ClusterTypeAll string = "ALL_CLUSTER"

Variables

This section is empty.

Functions

func PublishEventsOnRest

func PublishEventsOnRest(jsonBody []byte, topic string, externalCdConfig *ExternalConfig) error

Types

type AcdConfig

type AcdConfig struct {
	ACDNamespace string `env:"ACD_NAMESPACE" envDefault:"devtroncd"`
	ACDInformer  bool   `env:"ACD_INFORMER" envDefault:"true"`
}

type ApplicationDetail added in v0.18.0

type ApplicationDetail struct {
	Application *v1alpha1.Application `json:"application"`
	StatusTime  time.Time             `json:"statusTime"`
}

type CdConfig

type CdConfig struct {
	DefaultNamespace string `env:"CD_DEFAULT_NAMESPACE" envDefault:"devtron-cd"`
	CdInformer       bool   `env:"CD_INFORMER" envDefault:"true"`
}

type CiConfig

type CiConfig struct {
	DefaultNamespace string `env:"DEFAULT_NAMESPACE" envDefault:"devtron-ci"`
	CiInformer       bool   `env:"CI_INFORMER" envDefault:"true"`
}

type ClusterConfig added in v0.18.0

type ClusterConfig struct {
	ClusterType string `env:"CLUSTER_TYPE" envDefault:"IN_CLUSTER"`
}

type Controller

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

Controller object

func (*Controller) HasSynced

func (c *Controller) HasSynced() bool

HasSynced is required for the cache.Controller interface.

func (*Controller) LastSyncResourceVersion

func (c *Controller) LastSyncResourceVersion() string

LastSyncResourceVersion is required for the cache.Controller interface.

func (*Controller) Run

func (c *Controller) Run(stopCh <-chan struct{})

Run starts the kubewatch controller

type CronEvent

type CronEvent struct {
	EventName     string            `json:"eventName"`
	EventTypeId   int               `json:"eventTypeId"`
	CorrelationId string            `json:"correlationId"`
	EventTime     string            `json:"eventTime"`
	Payload       map[string]string `json:"payload"`
}

type Event

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

Event indicate the informerEvent

type EventType

type EventType int
const Fail EventType = 3
const Success EventType = 2
const Trigger EventType = 1

type ExternalConfig added in v0.18.0

type ExternalConfig struct {
	External    bool   `env:"CD_EXTERNAL_REST_LISTENER" envDefault:"false"`
	Token       string `env:"CD_EXTERNAL_ORCHESTRATOR_TOKEN" envDefault:""`
	ListenerUrl string `env:"CD_EXTERNAL_LISTENER_URL" envDefault:"http://devtroncd-orchestrator-service-prod.devtroncd:80"`
	Namespace   string `env:"CD_EXTERNAL_NAMESPACE" envDefault:""`
}

This is being used by CI as well as CD

type Informer added in v0.18.0

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

func NewStartController added in v0.18.0

func NewStartController(logger *zap.SugaredLogger, client *pubsub.PubSubClientServiceImpl, externalConfig *ExternalConfig, httpTransportConfig *k8s1.CustomK8sHttpTransportConfig) *Informer

func (*Informer) SendAppDelete added in v0.18.0

func (impl *Informer) SendAppDelete(app *v1alpha1.Application, statusTime time.Time)

func (*Informer) SendAppUpdate added in v0.18.0

func (impl *Informer) SendAppUpdate(app *v1alpha1.Application, statusTime time.Time)

func (*Informer) Start added in v0.18.0

func (impl *Informer) Start(stopChan <-chan int)

type PublishRequest

type PublishRequest struct {
	Topic   string          `json:"topic"`
	Payload json.RawMessage `json:"payload"`
}

type WorkflowUpdateReq

type WorkflowUpdateReq struct {
	Key  string `json:"key"`
	Type string `json:"type"`
}

Jump to

Keyboard shortcuts

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