missionctl

package
v0.0.0-...-be214e9 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MissionControl

type MissionControl interface {
	Enrich(
		ctx context.Context,
		header http.Header,
		body []byte,
	) (mchttp.Response, *errors.TuringError)
	Route(
		ctx context.Context,
		header http.Header,
		body []byte,
	) (*experiment.Response, mchttp.Response, *errors.TuringError)
	Ensemble(
		ctx context.Context,
		header http.Header,
		requestBody []byte,
		routerResponse []byte,
	) (mchttp.Response, *errors.TuringError)
	IsEnricherEnabled() bool
	IsEnsemblerEnabled() bool
}

MissionControl is the base interface for the Turing Mission Control

func NewMissionControl

func NewMissionControl(
	client *http.Client,
	enrichmentCfg *config.EnrichmentConfig,
	routerCfg *config.RouterConfig,
	ensemblerCfg *config.EnsemblerConfig,
	appCfg *config.AppConfig,
) (MissionControl, error)

NewMissionControl creates new instance of the MissingControl, based on the http.Client and configuration passed into it

type MissionControlUPI

type MissionControlUPI interface {
	Route(context.Context, fiber.Request) (fiber.Response, *errors.TuringError)
}

func NewMissionControlUPI

func NewMissionControlUPI(
	cfgFilePath string,
	fiberDebugLog bool,
) (MissionControlUPI, error)

NewMissionControlUPI creates new instance of the MissingControl, based on the grpc configuration of fiber.yaml

Directories

Path Synopsis
Package errors provides definitions for some common errors that may be encountered through the course of the turning mission control's functions.
Package errors provides definitions for some common errors that may be encountered through the course of the turning mission control's functions.
internal/testutils
Package testutils contains mocks that can be shared across tests for multiple packages
Package testutils contains mocks that can be shared across tests for multiple packages
log
upi

Jump to

Keyboard shortcuts

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