providers

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2018 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLoggerForMessage

func GetLoggerForMessage(message messaging.Message, l *log.Entry) *log.Entry

GetLoggerForMessage Adds context fields to the logger for the message

func GetSharedHandlerArgs

func GetSharedHandlerArgs(c *types.Configuration, sbKeys servicebus.AccessKeys) []string

GetSharedHandlerArgs gets the shared arguments used by the handler container

Types

type AzureBatch

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

AzureBatch schedules jobs onto k8s from the queue and monitors their progress

func NewAzureBatchProvider

func NewAzureBatchProvider(config *types.Configuration, sharedHandlerArgs []string) (*AzureBatch, error)

NewAzureBatchProvider creates a provider for azure batch.

func (*AzureBatch) Dispatch

func (b *AzureBatch) Dispatch(message messaging.Message) error

Dispatch will dispatch a job onto Azure Batch

func (*AzureBatch) InProgressCount

func (b *AzureBatch) InProgressCount() int

InProgressCount will show how many tasks are currently in progress

func (*AzureBatch) Reconcile

func (b *AzureBatch) Reconcile() error

Reconcile will check inprogress tasks against and accept/reject messages were the job has completed/failed

type Kubernetes

type Kubernetes struct {
	Namespace string
	// contains filtered or unexported fields
}

Kubernetes schedules jobs onto k8s from the queue and monitors their progress

func NewKubernetesProvider

func NewKubernetesProvider(config *types.Configuration, sharedHandlerArgs []string) (*Kubernetes, error)

NewKubernetesProvider Creates an instance and does basic setup

func (*Kubernetes) Dispatch

func (k *Kubernetes) Dispatch(message messaging.Message) error

Dispatch creates a job on kubernetes for the message

func (*Kubernetes) InProgressCount

func (k *Kubernetes) InProgressCount() int

InProgressCount provides a count of the currently running jobs

func (*Kubernetes) Reconcile

func (k *Kubernetes) Reconcile() error

Reconcile will review the state of running jobs and accept or reject messages accordingly

type Provider

type Provider interface {
	Reconcile() error
	Dispatch(message messaging.Message) error
	InProgressCount() int
}

Provider is the interface a compute provider must fullfil to schedule and reconsile jobs

Jump to

Keyboard shortcuts

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