meshmodel

package
v0.6.18 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entity

type Entity interface {
	Type() types.CapabilityType
	GetID() uuid.UUID
}

Entity is referred as any type of schema managed by the registry ComponentDefinitions and PolicyDefinitions are examples of entities

type Host

type Host struct {
	ID        uuid.UUID `json:"-"`
	Hostname  string
	Port      int
	ContextID string
	CreatedAt time.Time `json:"-"`
	UpdatedAt time.Time `json:"-"`
}

type MeshModelRegistrantData added in v0.6.10

type MeshModelRegistrantData struct {
	Host       Host                 `json:"host"`
	EntityType types.CapabilityType `json:"entityType"`
	Entity     []byte               `json:"entity"` //This will be type converted to appropriate entity on server based on passed entity type
}

MeshModelRegistrantData struct defines the body of the POST request that is sent to the capability registry (Meshery)

The body contains the 1. Host information 2. Entity type 3. Entity

type Registry

type Registry struct {
	ID           uuid.UUID
	RegistrantID uuid.UUID
	Entity       uuid.UUID
	Type         types.CapabilityType
	CreatedAt    time.Time
	UpdatedAt    time.Time
}

type RegistryManager

type RegistryManager struct {
	// contains filtered or unexported fields
}

RegistryManager instance will expose methods for registry operations & sits between the database level operations and user facing API handlers.

func NewRegistryManager

func NewRegistryManager(db *database.Handler) (*RegistryManager, error)

NewRegistryManager initializes the registry manager by creating appropriate tables. Any new entities that are added to the registry should be migrated here into the database

func (*RegistryManager) Cleanup

func (rm *RegistryManager) Cleanup()

func (*RegistryManager) GetEntities

func (rm *RegistryManager) GetEntities(f types.Filter) []Entity

func (*RegistryManager) GetModels added in v0.6.18

func (rm *RegistryManager) GetModels(f types.Filter) []v1alpha1.Model

func (*RegistryManager) GetRegistrant added in v0.6.15

func (rm *RegistryManager) GetRegistrant(e Entity) Host

func (*RegistryManager) RegisterEntity

func (rm *RegistryManager) RegisterEntity(h Host, en Entity) error

Directories

Path Synopsis
core

Jump to

Keyboard shortcuts

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