controller

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2021 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FireDailyMinuteEvent

func FireDailyMinuteEvent()

func PublishEventsOnRest

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

func SendAppUpdate

func SendAppUpdate(app *v1alpha12.Application, client *PubSubClient)

func Start

func Start(conf *config.Config, eventHandler handlers.Handler)

Types

type AcdConfig

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

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 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 ExternalCdConfig

type ExternalCdConfig 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:""`
}

type PubSubClient

type PubSubClient struct {
	Conn stan.Conn
}

func NewPubSubClient

func NewPubSubClient() (*PubSubClient, error)

type PubSubConfig

type PubSubConfig struct {
	NatsServerHost string `env:"NATS_SERVER_HOST" envDefault:"nats://devtron-nats.devtroncd:4222"`
	ClusterId      string `env:"CLUSTER_ID" envDefault:"devtron-stan"`
	ClientId       string `env:"CLIENT_ID" envDefault:"kubewatch"`
}

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