types

package
v0.0.0-...-0c3390c Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultVanName    string = "skupper"
	DefaultBridgeName string = "skupper0"
)
View Source
const (
	TransportDeploymentName string = "skupper-router"
	TransportComponentName  string = "router"
	DefaultTransportImage   string = "quay.io/skupper/qdrouterd:0.4"
	TransportContainerName  string = "router"
	TransportLivenessPort   int32  = 9090
	TransportEnvConfig      string = "QDROUTERD_CONF"
	TransportSaslConfig     string = "skupper-sasl-config"
	TransportNetworkName    string = "skupper-network"
	TransportConfigFile     string = "qdrouterd.json"
)

Transport constants

View Source
const (
	ControllerDeploymentName string = "skupper-service-controller"
	ControllerComponentName  string = "controller"
	//	DefaultControllerImage   string = "quay.io/ajssmith/skupper-exp-controller"
	DefaultControllerImage  string = "localhost:5000/skupper-exp-controller"
	ControllerContainerName string = "service-controller"
	ControllerConfigPath    string = "/etc/messaging/"
	ControllerPluginPath    string = "/etc/plugins"
)

Controller constants TODO: revert controller image

View Source
const (
	BaseQualifier    string = "skupper.io"
	TokenGeneratedBy string = BaseQualifier + "/generated-by"
	TokenCost        string = BaseQualifier + "/cost"
)

Skupper qualifiers

View Source
const (
	ConsolePortName                        string = "console"
	ConsoleServiceName                     string = "skupper-console"
	ConsoleDefaultServicePort              int32  = 8080
	ConsoleDefaultServiceTargetPort        int32  = 8080
	ConsoleOpenShiftServicePort            int32  = 8888
	ConsoleOpenShiftOauthServicePort       int32  = 443
	ConsoleOpenShiftOuathServiceTargetPort int32  = 8443
	ConsoleOpenShiftServingCerts           string = "skupper-proxy-certs"
)

Console constants

View Source
const (
	AmqpDefaultPort         int32  = 5672
	AmqpsDefaultPort        int32  = 5671
	EdgeRole                string = "edge"
	EdgeRouteName           string = "skupper-edge"
	EdgeListenerPort        int32  = 45671
	InterRouterRole         string = "inter-router"
	InterRouterListenerPort int32  = 55671
	InterRouterRouteName    string = "skupper-inter-router"
	InterRouterProfile      string = "skupper-internal"
)

Router constants

View Source
const (
	ServiceSyncAddress = "mc/$skupper-service-sync"
)

Controller Service Interface constants

Variables

View Source
var TransportPrometheusAnnotations = map[string]string{
	"prometheus.io/port":   "9090",
	"prometheus.io/scrape": "true",
}

Functions

func GetSkupperPath

func GetSkupperPath(p Path) string

Types

type ByServiceInterfaceAddress

type ByServiceInterfaceAddress []ServiceInterface

func (ByServiceInterfaceAddress) Len

func (ByServiceInterfaceAddress) Less

func (a ByServiceInterfaceAddress) Less(i, j int) bool

func (ByServiceInterfaceAddress) Swap

func (a ByServiceInterfaceAddress) Swap(i, j int)

type CertAuthority

type CertAuthority struct {
	Name string
}

type Connector

type Connector struct {
	Name           string `json:"name,omitempty"`
	Role           string `json:"role,omitempty"`
	Host           string `json:"host"`
	Port           string `json:"port"`
	RouteContainer bool   `json:"routeContainer,omitempty"`
	Cost           int32  `json:"cost,omitempty"`
	VerifyHostname bool   `json:"verifyHostname,omitempty"`
	SslProfile     string `json:"sslProfile,omitempty"`
	LinkCapacity   int32  `json:"linkCapacity,omitempty"`
}

type ConnectorCreateOptions

type ConnectorCreateOptions struct {
	Name string
	Cost int32
}

type ConnectorInspectResponse

type ConnectorInspectResponse struct {
	Connector *Connector
	Connected bool
}

type ConnectorRole

type ConnectorRole string
const (
	ConnectorRoleInterRouter ConnectorRole = "inter-router"
	ConnectorRoleEdge                      = "edge"
)

type ConsoleAuthMode

type ConsoleAuthMode string
const (
	ConsoleAuthModeInternal  ConsoleAuthMode = "internal"
	ConsoleAuthModeUnsecured                 = "unsecured"
)

type Credential

type Credential struct {
	CA          string
	Name        string
	Subject     string
	Hosts       []string
	ConnectJson bool
	Post        bool
	Data        map[string][]byte
}

type DeploymentSpec

type DeploymentSpec struct {
	Image        string            `json:"image,omitempty"`
	LivenessPort int32             `json:"livenessPort,omitempty"`
	Labels       map[string]string `json:"labels,omitempty"`
	EnvVar       map[string]string `json:"envVar,omitempty"`
	Ports        nat.PortSet       `json:"ports,omitempty"`
	Volumes      []string          `json:"volumes,omitempty"`
	Mounts       map[string]string `json:"mounts,omitempty"`
}

DeploymentSpec for the VAN router or controller components to run within a cluster

type Headless

type Headless struct {
	Name       string `json:"name"`
	Size       int    `json:"size"`
	TargetPort int    `json:"targetPort,omitempty"`
}

type Path

type Path int
const (
	HostPath Path = iota
	CertsPath
	ConnectionsPath
	ConfigPath
	ConsoleUsersPath
	SaslConfigPath
	ServicesPath
	SitesPath
)

type RouterInspectResponse

type RouterInspectResponse struct {
	Status            RouterStatusSpec
	TransportVersion  string
	ControllerVersion string
	ExposedServices   int
}

type RouterSpec

type RouterSpec struct {
	Name           string          `json:"name,omitempty"`
	AuthMode       ConsoleAuthMode `json:"authMode,omitempty"`
	Transport      DeploymentSpec  `json:"transport,omitempty"`
	Controller     DeploymentSpec  `json:"controller,omitempty"`
	RouterConfig   string          `json:"routerConfig,omitempty"`
	Users          []User          `json:"users,omitempty"`
	CertAuthoritys []CertAuthority `json:"certAuthoritys,omitempty"`
	Credentials    []Credential    `json:"credentials,omitempty"`
}

TODO: what is possiblity of using types from skupper itself (e.g. no namespace for docker or we change the name to endpoint, etc. RouterSpec is the specification of VAN network with router, controller and assembly

type RouterStatusSpec

type RouterStatusSpec struct {
	Mode           string                  `json:"mode,omitempty"`
	State          string                  `json:"state,omitempty"`
	ConnectedSites TransportConnectedSites `json:"connectedSites,omitempty"`
	BindingsCount  int                     `json:"bindingsCount,omitempty"`
}

type ServiceInterface

type ServiceInterface struct {
	Address      string                   `json:"address"`
	Protocol     string                   `json:"protocol"`
	Port         int                      `json:"port"`
	EventChannel bool                     `json:"eventchannel,omitempty"`
	Aggregate    string                   `json:"aggregate,omitempty"`
	Headless     *Headless                `json:"headless,omitempty"`
	Targets      []ServiceInterfaceTarget `json:"targets"`
	Origin       string                   `json:"origin,omitempty"`
	Alias        string                   `json:"alias,omitempty"`
}

type ServiceInterfaceCreateOptions

type ServiceInterfaceCreateOptions struct {
	Protocol   string
	Address    string
	Port       int
	TargetPort int
	Headless   bool
}

type ServiceInterfaceTarget

type ServiceInterfaceTarget struct {
	Name       string `json:"name,omitempty"`
	Selector   string `json:"selector"`
	TargetPort int    `json:"targetPort,omitempty"`
	Service    string `json:"service,omitempty"`
}

type SiteConfig

type SiteConfig struct {
	Spec SiteConfigSpec
	UID  string
}

type SiteConfigSpec

type SiteConfigSpec struct {
	SkupperName           string
	SkupperNamespace      string
	IsEdge                bool
	EnableController      bool
	EnableServiceSync     bool
	EnableRouterConsole   bool
	EnableConsole         bool
	AuthMode              string
	User                  string
	Password              string
	MapToHost             bool
	Replicas              int32
	TraceLog              bool
	ContainerEngineDriver string
}

type TransportConnectedSites

type TransportConnectedSites struct {
	Direct   int
	Indirect int
	Total    int
	Warnings []string
}

type TransportMode

type TransportMode string

TransportMode describes how a qdr is intended to be deployed, either interior or edge

const (
	// TransportModeInterior means the qdr will participate in inter-router protocol exchanges
	TransportModeInterior TransportMode = "interior"
	// TransportModeEdge means that the qdr will connect to interior routers for network access
	TransportModeEdge = "edge"
)

type User

type User struct {
	Name     string
	Password string
}

type VanClientInterface

type VanClientInterface interface {
	ConnectorCreate(secretFile string, options ConnectorCreateOptions) (string, error)
	ConnectorInspect(name string) (*ConnectorInspectResponse, error)
	ConnectorList() ([]*Connector, error)
	ConnectorRemove(name string) error
	ConnectorTokenCreate(subject string, secretFile string) error
	RouterCreate(options SiteConfigSpec) error
	RouterInspect() (*RouterInspectResponse, error)
	RouterRemove() []error
	ServiceInterfaceBind(service *ServiceInterface, targetType string, targetName string, protocol string, targetPort int) error
	ServiceInterfaceCreate(service *ServiceInterface) error
	ServiceInterfaceInspect(address string) (*ServiceInterface, error)
	ServiceInterfaceList() ([]ServiceInterface, error)
	ServiceInterfaceRemove(address string) error
	ServiceInterfaceUnbind(targetType string, targetName string, address string, deleteIfNoTargets bool) error
	SiteConfigInspect(name string) (*SiteConfig, error)
}

Jump to

Keyboard shortcuts

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