v2beta1

package
v0.22.5 Latest Latest
Warning

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

Go to latest
Published: May 5, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TCP = ServiceProtocol("TCP")
	UDP = ServiceProtocol("UDP")
)

Variables

View Source
var ErrUnsupportedServiceProtocol = errors.New("Unsuported service protocol")

Functions

This section is empty.

Types

type Group

type Group struct {
	Name     string
	Services []Service
}

Group store name and list of services

func (Group) GetName

func (g Group) GetName() string

GetName returns the name of group

func (Group) GetResources

func (g Group) GetResources() []types.Resources

GetResources returns list of resources in a group

type Manifest

type Manifest []Group

Manifest store list of groups

func (Manifest) GetGroups

func (m Manifest) GetGroups() []Group

GetGroups returns a manifest with groups list

type Service

type Service struct {
	Name      string
	Image     string
	Command   []string
	Args      []string
	Env       []string
	Resources types.ResourceUnits
	Count     uint32
	Expose    []ServiceExpose
	Params    *ServiceParams `json:"params,omitempty" yaml:"params,omitempty"`
}

Service stores name, image, args, env, unit, count and expose list of service

func (Service) GetCount

func (s Service) GetCount() uint32

GetCount returns count of service

func (Service) GetResourceUnits

func (s Service) GetResourceUnits() types.ResourceUnits

GetResourceUnits returns resources unit of service

type ServiceExpose

type ServiceExpose struct {
	Port                   uint16 // Port on the container
	ExternalPort           uint16 // Port on the service definition
	Proto                  ServiceProtocol
	Service                string
	Global                 bool
	Hosts                  []string
	HTTPOptions            ServiceExposeHTTPOptions
	IP                     string // The name of the IP address associated with this, if any
	EndpointSequenceNumber uint32 // The sequence number of the associated endpoint in the on-chain data
}

ServiceExpose stores exposed ports and hosts details

type ServiceExposeHTTPOptions

type ServiceExposeHTTPOptions struct {
	MaxBodySize uint32
	ReadTimeout uint32
	SendTimeout uint32
	NextTries   uint32
	NextTimeout uint32
	NextCases   []string
}

type ServiceParams

type ServiceParams struct {
	Storage []StorageParams
}

type ServiceProtocol

type ServiceProtocol string

func ParseServiceProtocol

func ParseServiceProtocol(input string) (ServiceProtocol, error)

func ServiceProtocolFromKube

func ServiceProtocolFromKube(proto corev1.Protocol) (ServiceProtocol, error)

func (ServiceProtocol) ToKube

func (sp ServiceProtocol) ToKube() (corev1.Protocol, error)

func (ServiceProtocol) ToString

func (sp ServiceProtocol) ToString() string

type StorageParams

type StorageParams struct {
	Name     string `json:"name" yaml:"name"`
	Mount    string `json:"readOnly" yaml:"mount"`
	ReadOnly bool   `json:"mount" yaml:"readOnly"`
}

Jump to

Keyboard shortcuts

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