temporal

package
v2.14.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultConnectionTimeout is the default connection timeout duration
	DefaultConnectionTimeout = 3 * time.Second

	// DefaultInsecureTransport is the default insecure transport security
	DefaultInsecureTransport = false

	// DefaultInsecureSkipTLSVerify is the default insecure skip tls verify
	DefaultInsecureSkipTLSVerify = false

	// CheckModeServer is the "server" check mode
	CheckModeServer = "server"

	// CheckModeWorker is the "worker" check mode
	CheckModeWorker = "worker"
)

Variables

View Source
var (
	// ErrInvalidMode defines invalid mode error
	ErrInvalidMode = errors.New("invalid checkMode provided")
	// ErrNoNamespace defines no namespace error
	ErrNoNamespace = errors.New(`no namespace provided (use temporal.WithNamespace("__namespace__"))`)
	// ErrNoTaskQueue defines no task queue error
	ErrNoTaskQueue = errors.New(`no task queue provided (use temporal.WithTaskQueue("__task_queue__"))`)
)

Functions

func New

func New(checkMode CheckMode, target string, opts ...Option) checker.Checker

New creates the Temporal checker

Types

type CheckMode

type CheckMode string

CheckMode specifies check mode

type Option

type Option func(t *Temporal)

Option configures a Temporal.

func WithExpectWorkerIdentityRegex

func WithExpectWorkerIdentityRegex(expectWorkerIdentityRegex string) Option

WithExpectWorkerIdentityRegex configures worker (Poller) identity expectation that is mandatory for the CheckModeWorker

func WithInsecureSkipTLSVerify

func WithInsecureSkipTLSVerify(insecureSkipTLSVerify bool) Option

WithInsecureSkipTLSVerify configures insecure skip tls verify

func WithInsecureTransport

func WithInsecureTransport(insecureTransport bool) Option

WithInsecureTransport disables transport security

func WithNamespace

func WithNamespace(namespace string) Option

WithNamespace configures the Temporal namespace that is mandatory for the CheckModeWorker

func WithTaskQueue

func WithTaskQueue(taskQueue string) Option

WithTaskQueue configures the Temporal task queue that is mandatory for the CheckModeWorker

func WithTimeout

func WithTimeout(timeout time.Duration) Option

WithTimeout configures a timeout for maximum amount of time a dial will wait for a GRPC connection to complete

type Temporal

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

Temporal represents Temporal checker

func (*Temporal) Check

func (t *Temporal) Check(ctx context.Context) (err error)

Check checks Temporal connection

func (*Temporal) Identity

func (t *Temporal) Identity() (string, error)

Identity returns the identity of the checker

Jump to

Keyboard shortcuts

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