core

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2019 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Package core contains the core logic of conductor. It is critical that the app itself is entirely stateless. All state is stored in the services themselves. The services may store their data externally depending on implementation.

Conductor server definition.

Index

Constants

View Source
const AdminPermissionMessage = "Only admins can call this endpoint."
View Source
const CheckJobsInterval = time.Second * 5
View Source
const CheckTrainLockInterval = time.Second * 5
View Source
const SyncTicketsInterval = time.Second * 10
View Source
const TrainCacheTtl = 5

Variables

This section is empty.

Functions

func CreateTrain

func CreateTrain(
	dataClient data.Client,
	messagingService messaging.Service,
	branch string,
	commits []*types.Commit) *types.Train

func DuplicateTrain

func DuplicateTrain(
	dataClient data.Client,
	messagingService messaging.Service,
	oldTrain *types.Train,
	commits []*types.Commit) *types.Train

func Endpoints

func Endpoints() []endpoint

func ExtendTrain

func ExtendTrain(
	dataClient data.Client,
	messagingService messaging.Service,
	train *types.Train,
	commits []*types.Commit,
	requester *types.User)

func NewServer

func NewServer(endpoints []endpoint) *mux.Router

func Preload

func Preload()

Preload attempts to load all services and start background tasks. Intended to be run once, at boot time. Blocking and parallel.

func QueueCommits

func QueueCommits(dataClient data.Client, commits []*types.Commit)

func StartTrain

func StartTrain(
	dataClient data.Client,
	codeService code.Service,
	messagingService messaging.Service,
	phaseService phase.Service,
	ticketService ticket.Service,
	train *types.Train)

Types

This section is empty.

Jump to

Keyboard shortcuts

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