triggermesh

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Namespace        = "local"
	ManifestFile     = "manifest.yaml"
	BrokerConfigFile = "broker.conf"

	UserInputTag = "<user_input>"

	// objects meta
	ContextLabel                = "triggermesh.io/context"
	ExternalResourcesAnnotation = "triggermesh.io/external-resources"
)

TriggerMesh constant values used as default paths, configs, etc.

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component interface {
	AsK8sObject() (kubernetes.Object, error)

	GetName() string
	GetKind() string
	GetAPIVersion() string
	GetSpec() map[string]interface{}

	SetSpec(map[string]interface{})
}

Component is the common interface for all TriggerMesh components.

type Consumer

type Consumer interface {
	ConsumedEventTypes() ([]string, error)
	GetPort(context.Context) (string, error)
}

Consumer is implemented by all components that consume events.

type Exportable added in v1.2.0

type Exportable interface {
	AsDockerComposeObject(additionalEnvs map[string]string) (interface{}, error)
	AsDigitalOceanObject(additionalEnvs map[string]string) (interface{}, error)
	AsKubernetesDeployment(additionalEnvs map[string]string) (interface{}, error)
}

type Parent

type Parent interface {
	GetChildren() ([]Component, error)
}

Parent is the interface of the components that produce additional components.

type Producer

type Producer interface {
	SetEventAttributes(map[string]string) error

	GetEventTypes() ([]string, error)
	GetEventSource() (string, error)
}

Producer is implemeted by all components that produce events.

type Reconcilable

type Reconcilable interface {
	Initialize(context.Context, map[string]string) (map[string]interface{}, error)
	Finalize(context.Context, map[string]string) error

	UpdateStatus(map[string]interface{})
	GetExternalResources() map[string]interface{}
}

Reconcilable is implemented by the components that depend on external services and require additional initialization and finalization logic.

type Runnable

type Runnable interface {
	Start(ctx context.Context, additionalEnv map[string]string, restart bool) (*docker.Container, error)
	Stop(context.Context) error
	Info(context.Context) (*docker.Container, error)
	Logs(ctx context.Context, since time.Time, follow bool) (io.ReadCloser, error)
}

Runnable is the interface for components that can run as Docker containers.

Jump to

Keyboard shortcuts

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