modulesvc

package
v0.0.0-...-01abcac Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ModuleCustomizer

type ModuleCustomizer interface {
	UndeployModuleAndSidecarPair(client *client.Client, pair *ModulePair) error
	DeployCustomModule(client *client.Client, pair *ModulePair) error
	DeployCustomSidecar(client *client.Client, pair *ModulePair) error
	CheckModuleAndSidecarReadiness(pair *ModulePair) error
}

ModuleCustomizer defines the interface for managing custom module deployment and lifecycle

type ModuleManager

type ModuleManager interface {
	GetDeployedModules(client *client.Client, filters filters.Args) ([]container.Summary, error)
	PullModule(client *client.Client, imageName string) error
	DeployModules(client *client.Client, containers *models.Containers, sidecarImage string, sidecarResources *container.Resources) (map[string]int, error)
	DeployModule(client *client.Client, container *models.Container) error
	UndeployModuleByNamePattern(client *client.Client, pattern string) error
}

ModuleManager defines the interface for managing module deployment and lifecycle

type ModulePair

type ModulePair struct {
	ID            string
	ModuleName    string
	ModuleVersion string
	ModuleURL     string
	SidecarURL    string
	Namespace     string
	Module        *models.ProxyModule
	Containers    *models.Containers
	NetworkConfig *network.NetworkingConfig
	BackendModule *models.BackendModule
}

ModulePair represents a module configured for traffic interception and debugging

func NewModulePair

func NewModulePair(a *action.Action, p *action.Param) (*ModulePair, error)

NewModulePair creates a new ModulePair instance with configured URLs for interception

func (*ModulePair) ClearModuleURL

func (mp *ModulePair) ClearModuleURL()

ClearModuleURL clears the module URL from the intercept module

func (*ModulePair) ClearSidecarURL

func (mp *ModulePair) ClearSidecarURL()

ClearSidecarURL clears the sidecar URL from the intercept module

type ModuleProcessor

ModuleProcessor defines the composite interface for all module-related operations

type ModuleProvisioner

type ModuleProvisioner interface {
	GetBackendModule(containers *models.Containers, moduleName string) (*models.BackendModule, *models.ProxyModule)
	GetModuleImageVersion(backendModule models.BackendModule, module *models.ProxyModule) string
	GetSidecarImage(modules []*models.ProxyModule) (string, bool, error)
	GetModuleImage(module *models.ProxyModule) string
	GetLocalModuleImage(namespace, moduleName, moduleVersion string) string
	GetModuleEnv(container *models.Containers, module *models.ProxyModule, backendModule models.BackendModule) []string
	GetSidecarEnv(containers *models.Containers, module *models.ProxyModule, backendModule models.BackendModule, moduleURL, sidecarURL string) []string
}

ModuleProvisioner defines the interface for module provisioning operations

type ModuleReadinessChecker

type ModuleReadinessChecker interface {
	CheckModuleReadiness(wg *sync.WaitGroup, errCh chan<- error, moduleName string, port int)
}

ModuleReadinessChecker defines the interface for module readiness check operations

type ModuleSvc

type ModuleSvc struct {
	Action              *action.Action
	HTTPClient          httpclient.HTTPClientRunner
	DockerClient        dockerclient.DockerClientRunner
	RegistrySvc         registrysvc.RegistryProcessor
	ModuleEnv           moduleenv.ModuleEnvProcessor
	ReadinessMaxRetries int
	ReadinessWait       time.Duration
}

ModuleSvc provides comprehensive functionality for managing backend modules

func (*ModuleSvc) CheckModuleAndSidecarReadiness

func (ms *ModuleSvc) CheckModuleAndSidecarReadiness(pair *ModulePair) error

func (*ModuleSvc) CheckModuleReadiness

func (ms *ModuleSvc) CheckModuleReadiness(wg *sync.WaitGroup, errCh chan<- error, moduleName string, port int)

func (*ModuleSvc) DeployCustomModule

func (ms *ModuleSvc) DeployCustomModule(client *client.Client, pair *ModulePair) error

func (*ModuleSvc) DeployCustomSidecar

func (ms *ModuleSvc) DeployCustomSidecar(client *client.Client, pair *ModulePair) error

func (*ModuleSvc) DeployModule

func (ms *ModuleSvc) DeployModule(client *client.Client, c *models.Container) error

func (*ModuleSvc) DeployModules

func (ms *ModuleSvc) DeployModules(client *client.Client, containers *models.Containers, sidecarImage string, sidecarResources *container.Resources) (map[string]int, error)

func (*ModuleSvc) GetBackendModule

func (ms *ModuleSvc) GetBackendModule(containers *models.Containers, moduleName string) (*models.BackendModule, *models.ProxyModule)

func (*ModuleSvc) GetDeployedModules

func (ms *ModuleSvc) GetDeployedModules(client *client.Client, filters filters.Args) ([]container.Summary, error)

func (*ModuleSvc) GetLocalModuleImage

func (ms *ModuleSvc) GetLocalModuleImage(namespace, moduleName, moduleVersion string) string

func (*ModuleSvc) GetModuleEnv

func (ms *ModuleSvc) GetModuleEnv(container *models.Containers, module *models.ProxyModule, backendModule models.BackendModule) []string

func (*ModuleSvc) GetModuleImage

func (ms *ModuleSvc) GetModuleImage(module *models.ProxyModule) string

func (*ModuleSvc) GetModuleImageVersion

func (ms *ModuleSvc) GetModuleImageVersion(backendModule models.BackendModule, module *models.ProxyModule) string

func (*ModuleSvc) GetSidecarEnv

func (ms *ModuleSvc) GetSidecarEnv(containers *models.Containers, module *models.ProxyModule, backendModule models.BackendModule, moduleURL, sidecarURL string) []string

func (*ModuleSvc) GetSidecarImage

func (ms *ModuleSvc) GetSidecarImage(modules []*models.ProxyModule) (string, bool, error)

func (*ModuleSvc) GetVaultRootToken

func (ms *ModuleSvc) GetVaultRootToken(client *client.Client) (string, error)

func (*ModuleSvc) PullModule

func (ms *ModuleSvc) PullModule(client *client.Client, imageName string) error

func (*ModuleSvc) UndeployModuleAndSidecarPair

func (ms *ModuleSvc) UndeployModuleAndSidecarPair(client *client.Client, pair *ModulePair) error

func (*ModuleSvc) UndeployModuleByNamePattern

func (ms *ModuleSvc) UndeployModuleByNamePattern(client *client.Client, pattern string) error

type ModuleVaultHandler

type ModuleVaultHandler interface {
	GetVaultRootToken(client *client.Client) (string, error)
}

ModuleVaultHandler defines the interface for module Vault operations

Jump to

Keyboard shortcuts

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