cluster

package
v0.7.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authentication

type Authentication struct {
	Key  string `json:"key"`
	Type string `json:"type"`
}

func NewAuthentication

func NewAuthentication() *Authentication

func (*Authentication) Clone added in v0.5.1

func (a *Authentication) Clone() *Authentication

func (*Authentication) ColoredYaml added in v0.5.1

func (a *Authentication) ColoredYaml() (string, error)

func (*Authentication) Render

func (a *Authentication) Render() (*Authentication, error)

func (*Authentication) Validate

func (a *Authentication) Validate() error

type Authorization

type Authorization struct {
	Policy     string `json:"policy"`
	Url        string `json:"url"`
	AutoReload int    `json:"auto_reload"`
}

func NewAuthorization

func NewAuthorization() *Authorization

func (*Authorization) Clone added in v0.5.1

func (a *Authorization) Clone() *Authorization

func (*Authorization) ColoredYaml added in v0.5.1

func (a *Authorization) ColoredYaml() (string, error)

func (*Authorization) Render

func (a *Authorization) Render() (*Authorization, error)

func (*Authorization) Validate

func (a *Authorization) Validate() error

type Cluster

type Cluster struct {
	Name           string            `json:"name"`
	Namespace      string            `json:"namespace"`
	Replicas       int               `json:"replicas"`
	Authentication *Authentication   `json:"authentication"`
	Authorization  *Authorization    `json:"authorization"`
	Health         *Health           `json:"health"`
	Image          *Image            `json:"image"`
	License        string            `json:"license"`
	Log            *Log              `json:"log"`
	NodeSelectors  map[string]string `json:"node_selectors"`
	Notification   *Notification     `json:"notification"`
	Queue          *Queue            `json:"queue"`
	Resource       *Resource         `json:"resource"`
	Api            *Service          `json:"api"`
	Grpc           *Service          `json:"grpc"`
	Rest           *Service          `json:"rest"`
	Routing        *Routing          `json:"routing"`
	Store          *Store            `json:"store"`
	Tls            *Tls              `json:"tls"`
	Volume         *Volume           `json:"volume"`
	Status         *Status           `json:"-" yaml:"-"`

	ImageSpec          string `json:"-" yaml:"-"`
	AuthenticationSpec string `json:"-" yaml:"-"`
	AuthorizationSpec  string `json:"-" yaml:"-"`
	HealthSpec         string `json:"-" yaml:"-"`
	NotificationSpec   string `json:"-" yaml:"-"`
	QueueSpec          string `json:"-" yaml:"-"`
	StoreSpec          string `json:"-" yaml:"-"`
	ApiServiceSpec     string `json:"-" yaml:"-"`
	GrpcServiceSpec    string `json:"-" yaml:"-"`
	RestServiceSpec    string `json:"-" yaml:"-"`
	VolumeSpec         string `json:"-" yaml:"-"`
	TlsSpec            string `json:"-" yaml:"-"`
	ResourcesSpec      string `json:"-" yaml:"-"`
	RoutingSpec        string `json:"-" yaml:"-"`
	LogSpec            string `json:"-" yaml:"-"`
	NodeSelectorsSpec  string `json:"-" yaml:"-"`
	LicenseSpec        string `json:"-" yaml:"-"`
	// contains filtered or unexported fields
}

func AddCluster added in v0.5.1

func AddCluster(handler ClustersHandler) (*Cluster, error)

func CopyCluster added in v0.5.1

func CopyCluster(origin *Cluster, handler ClustersHandler) (*Cluster, error)

func EditCluster added in v0.5.1

func EditCluster(origin *Cluster, handler ClustersHandler, isCopyMode bool) (*Cluster, error)

func NewCluster

func NewCluster(handler ClustersHandler) *Cluster

func (*Cluster) Clone added in v0.5.1

func (c *Cluster) Clone(handler ClustersHandler) *Cluster

func (*Cluster) ColoredYaml added in v0.5.1

func (c *Cluster) ColoredYaml() (string, error)

func (*Cluster) EndPoints added in v0.5.1

func (c *Cluster) EndPoints() []string

TODO - add parsing grpc end points

func (*Cluster) Key added in v0.5.1

func (c *Cluster) Key() string

func (*Cluster) Render

func (c *Cluster) Render() (*Cluster, error)

func (*Cluster) SetGrpcEndPoints added in v0.5.1

func (c *Cluster) SetGrpcEndPoints(value string) *Cluster

func (*Cluster) SetNamespaces

func (c *Cluster) SetNamespaces(value []string) *Cluster

func (*Cluster) SetTakenClusterNames

func (c *Cluster) SetTakenClusterNames(value []string) *Cluster

func (*Cluster) Validate

func (c *Cluster) Validate() error

type ClustersHandler added in v0.5.1

type ClustersHandler interface {
	Name() string
	Add(cluster *Cluster) error
	Edit(cluster *Cluster) error
	Delete(cluster *Cluster) error
	Get(namespace, name string) (*Cluster, error)
	List() ([]*Cluster, error)
	ConnectorsHandler() connector.ConnectorsHandler
}

type Health

type Health struct {
	Enabled             bool `json:"enabled"`
	InitialDelaySeconds int  `json:"initial_delay_seconds"`
	PeriodSeconds       int  `json:"period_seconds"`
	TimeoutSeconds      int  `json:"timeout_seconds"`
	SuccessThreshold    int  `json:"success_threshold"`
	FailureThreshold    int  `json:"failure_threshold"`
}

func NewHealth

func NewHealth() *Health

func (*Health) Clone added in v0.5.1

func (h *Health) Clone() *Health

func (*Health) ColoredYaml added in v0.5.1

func (h *Health) ColoredYaml() (string, error)

func (*Health) Render

func (h *Health) Render() (*Health, error)

func (*Health) Validate

func (h *Health) Validate() error

type Image

type Image struct {
	Image      string `json:"image"`
	PullPolicy string `json:"pull_policy"`
}

func NewImage

func NewImage() *Image

func (*Image) Clone added in v0.5.1

func (i *Image) Clone() *Image

func (*Image) ColoredYaml added in v0.5.1

func (i *Image) ColoredYaml() (string, error)

func (*Image) Render

func (i *Image) Render() (*Image, error)

func (*Image) Validate

func (i *Image) Validate() error

type License

type License struct {
	Data string
}

func NewLicense

func NewLicense() *License

func (*License) Clone added in v0.5.1

func (l *License) Clone() *License

func (*License) ColoredYaml added in v0.5.1

func (l *License) ColoredYaml() (string, error)

func (*License) Render

func (l *License) Render(current string) (string, error)

func (*License) Validate

func (l *License) Validate() error

type Log

type Log struct {
	Level int `json:"level"`
	// contains filtered or unexported fields
}

func NewLog

func NewLog() *Log

func (*Log) Clone added in v0.5.1

func (l *Log) Clone() *Log

func (*Log) ColoredYaml added in v0.5.1

func (l *Log) ColoredYaml() (string, error)

func (*Log) Render

func (l *Log) Render() (*Log, error)

func (*Log) Validate

func (l *Log) Validate() error

type Name

type Name struct {
	Name string
	// contains filtered or unexported fields
}

func NewName

func NewName() *Name

func (*Name) Clone added in v0.5.1

func (n *Name) Clone() *Name

func (*Name) Render

func (n *Name) Render(defaultName string) (*Name, error)

func (*Name) SetTakenNames

func (n *Name) SetTakenNames(value []string) *Name

func (*Name) Validate

func (n *Name) Validate() error

type Namespace

type Namespace struct {
	Namespace string
	// contains filtered or unexported fields
}

func NewNamespace

func NewNamespace() *Namespace

func (*Namespace) Clone added in v0.5.1

func (n *Namespace) Clone() *Namespace

func (*Namespace) Render

func (n *Namespace) Render(defaultNamespace string) (*Namespace, error)

func (*Namespace) SetNamespaces

func (n *Namespace) SetNamespaces(value []string) *Namespace

func (*Namespace) Validate

func (n *Namespace) Validate() error

type NodeSelector

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

func NewNodeSelector

func NewNodeSelector() *NodeSelector

func (*NodeSelector) Clone added in v0.5.1

func (n *NodeSelector) Clone() *NodeSelector

func (*NodeSelector) ColoredYaml added in v0.5.1

func (n *NodeSelector) ColoredYaml() (string, error)

func (*NodeSelector) Render

func (n *NodeSelector) Render(values map[string]string) (map[string]string, error)

func (*NodeSelector) Validate

func (n *NodeSelector) Validate() error

type Notification

type Notification struct {
	Prefix  string `json:"prefix"`
	Enabled bool   `json:"enabled"`
}

func NewNotification

func NewNotification() *Notification

func (*Notification) Clone added in v0.5.1

func (n *Notification) Clone() *Notification

func (*Notification) ColoredYaml added in v0.5.1

func (n *Notification) ColoredYaml() (string, error)

func (*Notification) Render

func (n *Notification) Render() (*Notification, error)

func (*Notification) Validate

func (n *Notification) Validate() error

type Queue

type Queue struct {
	MaxReceiveMessagesRequest int `json:"max_receive_messages_request"`
	MaxWaitTimeoutSeconds     int `json:"max_wait_timeout_seconds"`
	MaxExpirationSeconds      int `json:"max_expiration_seconds"`
	MaxDelaySeconds           int `json:"max_delay_seconds"`
	MaxReQueues               int `json:"max_re_queues"`
	MaxVisibilitySeconds      int `json:"max_visibility_seconds"`
	DefaultVisibilitySeconds  int `json:"default_visibility_seconds"`
	DefaultWaitTimeoutSeconds int `json:"default_wait_timeout_seconds"`
}

func NewQueue

func NewQueue() *Queue

func (*Queue) Clone added in v0.5.1

func (q *Queue) Clone() *Queue

func (*Queue) ColoredYaml added in v0.5.1

func (q *Queue) ColoredYaml() (string, error)

func (*Queue) Render

func (q *Queue) Render() (*Queue, error)

func (*Queue) Validate

func (q *Queue) Validate() error

type Replicas

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

func NewReplicas

func NewReplicas() *Replicas

func (*Replicas) Render

func (r *Replicas) Render() (int, error)

func (*Replicas) Validate

func (r *Replicas) Validate() error

type Resource

type Resource struct {
	LimitsCpu      string `json:"limits_cpu"`
	LimitsMemory   string `json:"limits_memory"`
	RequestsCpu    string `json:"requests_cpu"`
	RequestsMemory string `json:"requests_memory"`
}

func NewResource

func NewResource() *Resource

func (*Resource) Clone added in v0.5.1

func (r *Resource) Clone() *Resource

func (*Resource) ColoredYaml added in v0.5.1

func (r *Resource) ColoredYaml() (string, error)

func (*Resource) Render

func (r *Resource) Render() (*Resource, error)

func (*Resource) Validate

func (r *Resource) Validate() error

type Routing

type Routing struct {
	Data       string `json:"data"`
	Url        string `json:"url"`
	AutoReload int    `json:"auto_reload"`
}

func NewRouting

func NewRouting() *Routing

func (*Routing) Clone added in v0.5.1

func (r *Routing) Clone() *Routing

func (*Routing) ColoredYaml added in v0.5.1

func (r *Routing) ColoredYaml() (string, error)

func (*Routing) Render

func (r *Routing) Render() (*Routing, error)

func (*Routing) Validate

func (r *Routing) Validate() error

type Service

type Service struct {
	NodePort   int    `json:"node_port"`
	Expose     string `json:"expose"`
	BufferSize int    `json:"buffer_size"`
	BodyLimit  int    `json:"body_limit"`
	// contains filtered or unexported fields
}

func NewService

func NewService() *Service

func (*Service) Clone added in v0.5.1

func (s *Service) Clone() *Service

func (*Service) ColoredYaml added in v0.5.1

func (s *Service) ColoredYaml() (string, error)

func (*Service) Render

func (s *Service) Render() (*Service, error)

func (*Service) SetKind

func (s *Service) SetKind(value string) *Service

func (*Service) Validate

func (s *Service) Validate() error

type Status added in v0.5.1

type Status struct {
	Replicas      int32  `json:"replicas"`
	Version       string `json:"version"`
	Ready         int32  `json:"ready"`
	Grpc          string `json:"grpc"`
	Rest          string `json:"rest"`
	Api           string `json:"api"`
	Selector      string `json:"selector"`
	LicenseType   string `json:"license_type"`
	LicenseTo     string `json:"license_to"`
	LicenseExpire string `json:"license_expire"`
	Status        string `json:"status"`
}

type Store

type Store struct {
	Clean                    bool   `json:"clean"`
	Path                     string `json:"path"`
	MaxChannels              int    `json:"max_channels"`
	MaxSubscribers           int    `json:"max_subscribers"`
	MaxMessages              int    `json:"max_messages"`
	MaxChannelSize           int    `json:"max_channel_size"`
	MessagesRetentionMinutes int    `json:"messages_retention_minutes"`
	PurgeInactiveMinutes     int    `json:"purge_inactive_minutes"`
}

func NewStore

func NewStore() *Store

func (*Store) Clone added in v0.5.1

func (s *Store) Clone() *Store

func (*Store) ColoredYaml added in v0.5.1

func (s *Store) ColoredYaml() (string, error)

func (*Store) Render

func (s *Store) Render() (*Store, error)

func (*Store) Validate

func (s *Store) Validate() error

type Template added in v0.5.1

type Template struct {
	Structure string
	Data      interface{}
	// contains filtered or unexported fields
}

func NewTemplate added in v0.5.1

func NewTemplate(str string, data interface{}) *Template

func (*Template) Get added in v0.5.1

func (t *Template) Get() ([]byte, error)

func (*Template) Write added in v0.5.1

func (t *Template) Write(p []byte) (n int, err error)

type Tls

type Tls struct {
	Cert string `json:"cert"`
	Key  string `json:"key"`
	Ca   string `json:"ca"`
}

func NewTls

func NewTls() *Tls

func (*Tls) Clone added in v0.5.1

func (t *Tls) Clone() *Tls

func (*Tls) ColoredYaml added in v0.5.1

func (t *Tls) ColoredYaml() (string, error)

func (*Tls) Render

func (t *Tls) Render() (*Tls, error)

func (*Tls) Validate

func (t *Tls) Validate() error

type Validator

type Validator interface {
	Validate() error
}

type Volume

type Volume struct {
	Size         string `json:"size"`
	StorageClass string `json:"storage_class"`
	// contains filtered or unexported fields
}

func NewVolume

func NewVolume() *Volume

func (*Volume) Clone added in v0.5.1

func (v *Volume) Clone() *Volume

func (*Volume) ColoredYaml added in v0.5.1

func (v *Volume) ColoredYaml() (string, error)

func (*Volume) Render

func (v *Volume) Render() (*Volume, error)

func (*Volume) SetStorageClasses

func (v *Volume) SetStorageClasses(value []string) *Volume

func (*Volume) Validate

func (v *Volume) Validate() error

Jump to

Keyboard shortcuts

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