meshmodel

package
v0.6.9 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 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
}

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 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) 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