core

package
v0.5.61 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteK8sWorkloads added in v0.5.61

func DeleteK8sWorkloads(ctx string)

func GetK8Components added in v0.5.61

func GetK8Components(config []byte, ctx string) (*manifests.Component, error)

func RegisterMesheryOAMTraits

func RegisterMesheryOAMTraits() error

RegisterMesheryOAMTraits will register local meshery traits with meshery server

func RegisterMesheryOAMWorkloads

func RegisterMesheryOAMWorkloads() error

RegisterMesheryOAMWorkloads will register local meshery workloads with meshery server

func RegisterScope

func RegisterScope(data []byte) (err error)

RegisterScope will register a Scope definition into the database

func RegisterTrait

func RegisterTrait(data []byte) (err error)

RegisterTrait will register a TraitDefinition into the database

func RegisterWorkload

func RegisterWorkload(data []byte) (err error)

RegisterWorkload will register a workload definition into the database

Types

type Pattern

type Pattern struct {
	Name     string              `yaml:"name,omitempty" json:"name,omitempty"`
	Services map[string]*Service `yaml:"services,omitempty" json:"services,omitempty"`
}

Pattern is the golang representation of the Pattern config file model

func NewPatternFile

func NewPatternFile(yml []byte) (af Pattern, err error)

NewPatternFile takes in raw yaml and encodes it into a construct

func NewPatternFileFromCytoscapeJSJSON

func NewPatternFileFromCytoscapeJSJSON(byt []byte) (Pattern, error)

NewPatternFileFromCytoscapeJSJSON takes in CytoscapeJS JSON and creates a PatternFile from it

func (*Pattern) GenerateApplicationConfiguration

func (p *Pattern) GenerateApplicationConfiguration() (v1alpha1.Configuration, error)

GenerateApplicationConfiguration generates OAM Application Configuration from the the given Pattern file for a particular deploymnet

func (*Pattern) GetApplicationComponent

func (p *Pattern) GetApplicationComponent(name string) (v1alpha1.Component, error)

GetApplicationComponent generates OAM Application Components from the the given Pattern file

func (*Pattern) GetServiceType

func (p *Pattern) GetServiceType(name string) string

GetServiceType returns the type of the service

func (*Pattern) ToCytoscapeJS

func (p *Pattern) ToCytoscapeJS() (cytoscapejs.GraphElem, error)

ToCytoscapeJS converts pattern file into cytoscape object

func (*Pattern) ToYAML

func (p *Pattern) ToYAML() ([]byte, error)

ToYAML converts a patternfile to yaml

type ScopeCapability

type ScopeCapability struct {
	OAMDefinition v1alpha1.ScopeDefinition `json:"oam_definition,omitempty"`
	// contains filtered or unexported fields
}

ScopeCapability is the struct for capturing the ScopeDefinition of a particular type

func GetScopes

func GetScopes() (scopes []ScopeCapability)

GetScopes return all of the scopes

type Service

type Service struct {
	// ID is the id of the service and is completely internal to
	// Meshery Server and meshery providers
	ID        *uuid.UUID `yaml:"id,omitempty" json:"id,omitempty"`
	Type      string     `yaml:"type,omitempty" json:"type,omitempty"`
	Namespace string     `yaml:"namespace,omitempty" json:"namespace,omitempty"`
	DependsOn []string   `yaml:"dependsOn,omitempty" json:"dependsOn,omitempty"`

	Settings map[string]interface{} `yaml:"settings,omitempty" json:"settings,omitempty"`
	Traits   map[string]interface{} `yaml:"traits,omitempty" json:"traits,omitempty"`
}

Service represents the services defined within the appfile

type TraitCapability

type TraitCapability struct {
	OAMDefinition v1alpha1.TraitDefinition `json:"oam_definition,omitempty"`
	// contains filtered or unexported fields
}

TraitCapability is the struct for capturing the workload definition of a particular type

func GetTraits

func GetTraits() (traits []TraitCapability)

GetTraits return all of the traits

type WorkloadCapability

type WorkloadCapability struct {
	OAMDefinition v1alpha1.WorkloadDefinition `json:"oam_definition,omitempty"`
	// contains filtered or unexported fields
}

WorkloadCapability is the struct for capturing the workload definition of a particular type

func GetWorkloads

func GetWorkloads() (caps []WorkloadCapability)

GetWorkloads return all of the workloads

Jump to

Keyboard shortcuts

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