vendors

package
v0.0.0-...-36aec5d Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: MIT Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IEvaluationContextVendor

type IEvaluationContextVendor interface {
	GetEvaluationContext() *utils.EvaluationContext
}

type IVendor

type IVendor interface {
	v1alpha2.Terminable
	RunLoop(ctx context.Context, interval time.Duration) error
	Init(config VendorConfig, managers []managers.IManagerFactroy, providers map[string]map[string]providers.IProvider, pubsubProvider pubsub.IPubSubProvider) error
	GetEndpoints() []v1alpha2.Endpoint
	GetInfo() VendorInfo
	SetEvaluationContext(context *utils.EvaluationContext)
}

type IVendorFactory

type IVendorFactory interface {
	CreateVendor(config VendorConfig) (IVendor, error)
}

type Vendor

type Vendor struct {
	Managers []managers.IManager
	Version  string
	Route    string
	Context  *contexts.VendorContext
	Config   VendorConfig
}

func (*Vendor) Init

func (v *Vendor) Init(config VendorConfig, factories []managers.IManagerFactroy, providers map[string]map[string]providers.IProvider, pubsubProvider pubsub.IPubSubProvider) error

func (*Vendor) RunLoop

func (v *Vendor) RunLoop(ctx context.Context, interval time.Duration) error

func (*Vendor) SetEvaluationContext

func (v *Vendor) SetEvaluationContext(context *utils.EvaluationContext)

func (*Vendor) Shutdown

func (v *Vendor) Shutdown(ctx context.Context) error

type VendorConfig

type VendorConfig struct {
	Type         string                   `json:"type"`
	Route        string                   `json:"route"`
	Managers     []managers.ManagerConfig `json:"managers"`
	Properties   map[string]string        `json:"properties,omitempty"`
	LoopInterval int                      `json:"loopInterval,omitempty"`
	SiteInfo     v1alpha2.SiteInfo        `json:"siteInfo"`
}

type VendorInfo

type VendorInfo struct {
	Version  string `json:"version"`
	Name     string `json:"name"`
	Producer string `json:"producer"`
}

Jump to

Keyboard shortcuts

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