patterns

package
v0.0.0-...-d386c04 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	StatusDisconnected = -100
	StatusConnected    = 100

	StatusStopped = -200
	StatusStarted = 200
)

Functions

This section is empty.

Types

type Connectable

type Connectable interface {
	Readiness() error
	Liveness() error

	Connect(ctx context.Context) error
	Disconnect(ctx context.Context) error
}

Connectable define how our external services should be implement one of important implementation is healthcheck we don't want to start an application that cannot connect to other services like database, cache, ...

type Runnable

type Runnable interface {
	Stop(ctx context.Context) error
	Start(ctx context.Context) error
	Run(ctx context.Context) error
}

Jump to

Keyboard shortcuts

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