providers

package
v0.0.0-...-81a8576 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ComponentNameLabel   = "app.oam.dev/component"
	ApplicationNameLabel = "app.oam.dev/name"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ComponentStatusHealth

type ComponentStatusHealth struct {
	Healthy bool      `json:"healthy"`
	Message string    `json:"message"`
	Updated time.Time `json:"updated"`
}

type LogStream

type LogStream struct {
	Stream chan string
	Done   chan bool
	Error  chan error
}

func NewLogStream

func NewLogStream() *LogStream

func (*LogStream) Close

func (l *LogStream) Close()

type NetworkProperties

type NetworkProperties struct {
	IP         string  `json:"ip"`
	ExternalIP string  `json:"external_ip"`
	Host       string  `json:"host"`
	Ports      []int32 `json:"port"`
}

type PVCStorageTrait

type PVCStorageTrait struct {
	PVC []struct {
		Name      string
		MountPath string
		Resources struct {
			Requests struct {
				Storage string
			}
		}
	}
}

type Pod

type Pod struct {
	Name       string         `json:"name"`
	Phase      string         `json:"phase"`
	Conditions []PodCondition `json:"conditions"`
}

type PodCondition

type PodCondition struct {
	Type    string `json:"type"`
	Status  string `json:"status"`
	Reason  string `json:"reason"`
	Message string `json:"message"`
}

type ProviderDispatcherVela

type ProviderDispatcherVela struct {
	OrganizationID  string
	ApplicationID   string
	ApplicationName string
	Namespace       string
	Environment     string
}

func (*ProviderDispatcherVela) DeployApplication

func (p *ProviderDispatcherVela) DeployApplication(manifest map[string]interface{}) error

func (*ProviderDispatcherVela) UpdateApplication

func (p *ProviderDispatcherVela) UpdateApplication(manifest map[string]interface{}) error

type ProviderStatusVela

type ProviderStatusVela struct {
	OrganizationID  string
	ApplicationID   string
	Namespace       string
	VelaApplication *vela.Application
}

func NewProviderStatusVela

func NewProviderStatusVela(organizationID string, applicationID string, namespace string) (*ProviderStatusVela, error)

func (*ProviderStatusVela) GetActivity

func (p *ProviderStatusVela) GetActivity(componentID string) error

func (*ProviderStatusVela) GetApplicationStatus

func (p *ProviderStatusVela) GetApplicationStatus() (string, error)

func (*ProviderStatusVela) GetComponentStatus

func (p *ProviderStatusVela) GetComponentStatus(componentName string) (*ComponentStatusHealth, error)

func (*ProviderStatusVela) GetNetworkProperties

func (p *ProviderStatusVela) GetNetworkProperties(componentName string) (*NetworkProperties, error)

func (*ProviderStatusVela) GetPodList

func (p *ProviderStatusVela) GetPodList(componentName string) ([]Pod, error)

func (*ProviderStatusVela) GetResourcesProperties

func (p *ProviderStatusVela) GetResourcesProperties(componentName string) (*ResourcesProperties, error)

func (*ProviderStatusVela) GetSourceProperties

func (p *ProviderStatusVela) GetSourceProperties(componentName string) (*SourceProperties, error)

func (*ProviderStatusVela) GetStorageProperties

func (p *ProviderStatusVela) GetStorageProperties(componentName string) (*StorageProperties, error)

func (*ProviderStatusVela) StreamLogs

func (p *ProviderStatusVela) StreamLogs(c context.Context, podName string, logStream *LogStream, linesBuffer int)

type ResourcesProperties

type ResourcesProperties struct {
	Replicas int32  `json:"replicas"`
	CPU      string `json:"cpu"`
	Memory   string `json:"memory"`
}

type SourceProperties

type SourceProperties struct {
	ContainerImage string `json:"container_image"`
	Command        string `json:"command"`
}

type StorageProperties

type StorageProperties struct {
	Volumes []VolumeProperties `json:"volumes"`
	Healthy bool               `json:"health"`
}

type VelaComponent

type VelaComponent struct {
	ComponentSpec   *vela.ApplicationComponent
	ComponentStatus *vela.ApplicationComponentStatus
}

type VolumeProperties

type VolumeProperties struct {
	Name string `json:"name"`
	Path string `json:"path"`
	Size string `json:"size"`
}

type WorkloadName

type WorkloadName string
const (
	Deployment  WorkloadName = "Deployment"
	StatefulSet WorkloadName = "StatefulSet"
)

Jump to

Keyboard shortcuts

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