meta

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alias

type Alias struct {
	Meta   Metadata `yaml:"meta" json:"meta"`
	Target string   `yaml:"target"  json:"target"`
}

Alias defines an alias for a channel Target is the channel which is being referenced by the alias

type App

type App struct {
	Meta Metadata `yaml:"meta,omitempty" json:"meta"`
	Spec AppSpec  `yaml:"spec,omitempty" json:"spec"`
}

App is an inspr component that represents an dApp. An App can contain other apps, channels and other components.

type AppAuth

type AppAuth struct {
	Scope       string            `yaml:"scope"  json:"scope"`
	Permissions utils.StringArray `yaml:"permissions"  json:"permissions"`
}

AppAuth represents the permissions that a dApp (and its children) contains

type AppBoundary

type AppBoundary struct {
	Input  utils.StringArray `yaml:"input,omitempty" json:"input"`
	Output utils.StringArray `yaml:"output,omitempty" json:"output"`
}

AppBoundary represents the connections this app can make to other apps. These are the fields that can be overriten by the ChannelAliases when instantiating the app.

type AppSpec

type AppSpec struct {
	Node     Node                        `yaml:"node,omitempty"   json:"node"`
	Apps     map[string]*App             `yaml:"apps,omitempty"   json:"apps"`
	Channels map[string]*Channel         `yaml:"channels,omitempty"   json:"channels"`
	Types    map[string]*Type            `yaml:"types,omitempty"   json:"types"`
	Aliases  map[string]*Alias           `yaml:"aliases"   json:"aliases"`
	Boundary AppBoundary                 `yaml:"boundary,omitempty"   json:"boundary"`
	Auth     AppAuth                     `yaml:"auth"  json:"auth"`
	LogLevel string                      `yaml:"logLevel" json:"logLevel"`
	Routes   map[string]*RouteConnection `yaml:"routes,omitempty" json:"routes"`
}

AppSpec represents the configuration of an App.

The boundary represent the possible connections to other apps, and the fields that can be overriten when instantiating the app.

type Channel

type Channel struct {
	Meta             Metadata          `yaml:"meta,omitempty"  json:"meta"`
	Spec             ChannelSpec       `yaml:"spec,omitempty"  json:"spec"`
	ConnectedApps    utils.StringArray `yaml:"connectedapps,omitempty"  json:"connectedapps"`
	ConnectedAliases utils.StringArray `yaml:"connectedaliases,omitempty"  json:"connectedaliasses"`
}

Channel is an Inspr component that represents a Channel.

type ChannelSpec

type ChannelSpec struct {
	Type               string   `yaml:"type,omitempty"  json:"type" `
	BrokerPriorityList []string `yaml:"brokerlist,omitempty" json:"brokerlist"`
	SelectedBroker     string   `yaml:"selectedbroker,omitempty" json:"selectedbroker"`
}

ChannelSpec is the specification of a channel. 'Type' string references a Type structure name

type Component

type Component struct {
	Kind       string `yaml:"kind"`
	APIVersion string `yaml:"apiVersion"`
}

Component defines a general component so we can determine how to apply a given file to the cluster

type Metadata

type Metadata struct {
	Name        string            `yaml:"name" json:"name"`
	Reference   string            `yaml:"reference,omitempty" json:"reference"`
	Annotations map[string]string `yaml:"annotations,omitempty" json:"annotations"`
	Parent      string            `yaml:"parent,omitempty" json:"parent"`
	UUID        string            `yaml:"uuid,omitempty"`
}

Metadata represents an arbitrary Inspr component. It represents this components' ID inside the cluster and the hub. Annotations can be used as query methods for getting components inside Inspr, just like kubernetes' annotations. The parent field represents the parent app of the object.

type Node

type Node struct {
	Meta Metadata `yaml:"meta,omitempty"  json:"meta"`
	Spec NodeSpec `yaml:"spec,omitempty"  json:"spec"`
}

Node represents an inspr component that is a node.

type NodePort

type NodePort struct {
	Port       int `yaml:"port" json:"port"`
	TargetPort int `yaml:"targetPort" json:"targetPort"`
}

NodePort represents a connection for a node

type NodeSpec

type NodeSpec struct {
	Ports         []NodePort           `yaml:"ports,omitempty" json:"ports,omitempty"`
	Image         string               `yaml:"image,omitempty"  json:"image"`
	Replicas      int                  `yaml:"replicas,omitempty" json:"replicas"`
	RestartPolicy string               `yaml:"restartPolicy,omitempty" json:"restartPolicy"`
	Environment   utils.EnvironmentMap `yaml:"environment,omitempty" json:"environment"`
	SidecarPort   SidecarPort          `yaml:"sidecarPort,omitempty" json:"sidecarPort"`
	Endpoints     utils.StringArray    `yaml:"endpoints,omitempty"  json:"endpoints"`
}

NodeSpec represents a configuration for a node. The image represents the Docker image for the main container of the Node.

type RouteConnection added in v0.1.4

type RouteConnection struct {
	Address   string
	Endpoints utils.StringArray
}

RouteConnection is the structure to the pod address and its endpoints

type SidecarPort

type SidecarPort struct {
	LBRead  int `json:"lbRead"`
	LBWrite int `json:"lbWrite"`
}

SidecarPort represents the port for communication between node and load balancer sidecar

type Type

type Type struct {
	Meta              Metadata `yaml:"meta,omitempty" json:"meta"`
	Schema            string   `yaml:"schema,omitempty" json:"schema"`
	ConnectedChannels []string `yaml:"connectedchannels,omitempty"  json:"connectedchannels"`
}

Type is a struct that can be a reference to an outsourced type or can be a local type, one of it's uses is the definition of the content type that is going to be sent in a channel or route.

Type will be defined via the workspace and instantiated as a string on the cluster

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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