v2beta1

package
v0.0.72 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: Apache-2.0 Imports: 15 Imported by: 3

Documentation

Index

Constants

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

Variables

View Source
var (
	ErrInvalidLengthGroup        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGroup          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGroup = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthHttpoptions        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowHttpoptions          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupHttpoptions = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidManifest         = errors.New("invalid manifest")
	ErrManifestCrossValidation = errors.New("manifest cross validation error")
)
View Source
var (
	ErrInvalidLengthService        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowService          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupService = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthServiceexpose        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowServiceexpose          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupServiceexpose = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrUnsupportedServiceProtocol = errors.New("unsupported service protocol")
)

Functions

func ExposeExternalPort

func ExposeExternalPort(expose ServiceExpose) int32

func IsIngress

func IsIngress(expose ServiceExpose) bool

func ValidateManifest

func ValidateManifest(m Manifest) error

ValidateManifest does validation for manifest

func ValidateManifestWithDeployment

func ValidateManifestWithDeployment(m *Manifest, dgroups []dtypes.Group) error

func ValidateManifestWithGroupSpecs

func ValidateManifestWithGroupSpecs(m *Manifest, gspecs []*dtypes.GroupSpec) error

Types

type Group

type Group struct {
	Name     string    `protobuf:"bytes,1,opt,name=name,proto3" json:"name" yaml:"name"`
	Services []Service `protobuf:"bytes,2,rep,name=services,proto3" json:"services" yaml:"services"`
}

Group store name and list of services

func (*Group) Descriptor

func (*Group) Descriptor() ([]byte, []int)

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

func (*Group) Marshal

func (m *Group) Marshal() (dAtA []byte, err error)

func (*Group) MarshalTo

func (m *Group) MarshalTo(dAtA []byte) (int, error)

func (*Group) MarshalToSizedBuffer

func (m *Group) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Group) ProtoMessage

func (*Group) ProtoMessage()

func (*Group) Reset

func (m *Group) Reset()

func (*Group) Size

func (m *Group) Size() (n int)

func (*Group) String

func (this *Group) String() string

func (*Group) Unmarshal

func (m *Group) Unmarshal(dAtA []byte) error

func (*Group) XXX_DiscardUnknown

func (m *Group) XXX_DiscardUnknown()

func (*Group) XXX_Marshal

func (m *Group) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Group) XXX_Merge

func (m *Group) XXX_Merge(src proto.Message)

func (*Group) XXX_Size

func (m *Group) XXX_Size() int

func (*Group) XXX_Unmarshal

func (m *Group) XXX_Unmarshal(b []byte) error

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                `protobuf:"bytes,1,opt,name=name,proto3" json:"name" yaml:"name"`
	Image     string                `protobuf:"bytes,2,opt,name=image,proto3" json:"image" yaml:"image"`
	Command   []string              `protobuf:"bytes,3,rep,name=command,proto3" json:"command" yaml:"command"`
	Args      []string              `protobuf:"bytes,4,rep,name=args,proto3" json:"args" yaml:"args"`
	Env       []string              `protobuf:"bytes,5,rep,name=env,proto3" json:"env" yaml:"env"`
	Resources v1beta2.ResourceUnits `protobuf:"bytes,6,opt,name=resources,proto3" json:"resources" yaml:"resources"`
	Count     uint32                `protobuf:"varint,7,opt,name=count,proto3" json:"count" yaml:"count"`
	Expose    []ServiceExpose       `protobuf:"bytes,8,rep,name=expose,proto3" json:"expose" yaml:"expose"`
	Params    *ServiceParams        `protobuf:"bytes,9,opt,name=params,proto3" json:"params" yaml:"params"`
}

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

func (*Service) Descriptor

func (*Service) Descriptor() ([]byte, []int)

func (*Service) GetArgs

func (m *Service) GetArgs() []string

func (*Service) GetCommand

func (m *Service) GetCommand() []string

func (*Service) GetCount

func (m *Service) GetCount() uint32

func (*Service) GetEnv

func (m *Service) GetEnv() []string

func (*Service) GetExpose

func (m *Service) GetExpose() []ServiceExpose

func (*Service) GetImage

func (m *Service) GetImage() string

func (*Service) GetName

func (m *Service) GetName() string

func (*Service) GetParams

func (m *Service) GetParams() *ServiceParams

func (*Service) GetResources

func (m *Service) GetResources() v1beta2.ResourceUnits

func (*Service) Marshal

func (m *Service) Marshal() (dAtA []byte, err error)

func (*Service) MarshalTo

func (m *Service) MarshalTo(dAtA []byte) (int, error)

func (*Service) MarshalToSizedBuffer

func (m *Service) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Service) ProtoMessage

func (*Service) ProtoMessage()

func (*Service) Reset

func (m *Service) Reset()

func (*Service) Size

func (m *Service) Size() (n int)

func (*Service) String

func (this *Service) String() string

func (*Service) Unmarshal

func (m *Service) Unmarshal(dAtA []byte) error

func (*Service) XXX_DiscardUnknown

func (m *Service) XXX_DiscardUnknown()

func (*Service) XXX_Marshal

func (m *Service) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Service) XXX_Merge

func (m *Service) XXX_Merge(src proto.Message)

func (*Service) XXX_Size

func (m *Service) XXX_Size() int

func (*Service) XXX_Unmarshal

func (m *Service) XXX_Unmarshal(b []byte) error

type ServiceExpose

type ServiceExpose struct {
	// port on the container
	Port uint32 `protobuf:"varint,1,opt,name=port,proto3" json:"port" yaml:"port"`
	// port on the service definition
	ExternalPort uint32                   `protobuf:"varint,2,opt,name=external_port,json=externalPort,proto3" json:"externalPort" yaml:"externalPort"`
	Proto        ServiceProtocol          `protobuf:"bytes,3,opt,name=proto,proto3,casttype=ServiceProtocol" json:"proto" yaml:"proto"`
	Service      string                   `protobuf:"bytes,4,opt,name=service,proto3" json:"service" yaml:"service"`
	Global       bool                     `protobuf:"varint,5,opt,name=global,proto3" json:"global" yaml:"global"`
	Hosts        []string                 `protobuf:"bytes,6,rep,name=hosts,proto3" json:"hosts" yaml:"hosts"`
	HTTPOptions  ServiceExposeHTTPOptions `protobuf:"bytes,7,opt,name=http_options,json=httpOptions,proto3" json:"httpOptions" yaml:"httpOptions"`
	// The name of the IP address associated with this, if any
	IP string `protobuf:"bytes,8,opt,name=ip,proto3" json:"ip" yaml:"ip"`
	// The sequence number of the associated endpoint in the on-chain data
	EndpointSequenceNumber uint32 `` /* 148-byte string literal not displayed */
}

ServiceExpose stores exposed ports and hosts details

func (*ServiceExpose) Descriptor

func (*ServiceExpose) Descriptor() ([]byte, []int)

func (*ServiceExpose) GetEndpointSequenceNumber

func (m *ServiceExpose) GetEndpointSequenceNumber() uint32

func (*ServiceExpose) GetExternalPort

func (m *ServiceExpose) GetExternalPort() uint32

func (*ServiceExpose) GetGlobal

func (m *ServiceExpose) GetGlobal() bool

func (*ServiceExpose) GetHTTPOptions

func (m *ServiceExpose) GetHTTPOptions() ServiceExposeHTTPOptions

func (*ServiceExpose) GetHosts

func (m *ServiceExpose) GetHosts() []string

func (*ServiceExpose) GetIP

func (m *ServiceExpose) GetIP() string

func (*ServiceExpose) GetPort

func (m *ServiceExpose) GetPort() uint32

func (*ServiceExpose) GetProto

func (m *ServiceExpose) GetProto() ServiceProtocol

func (*ServiceExpose) GetService

func (m *ServiceExpose) GetService() string

func (*ServiceExpose) Marshal

func (m *ServiceExpose) Marshal() (dAtA []byte, err error)

func (*ServiceExpose) MarshalTo

func (m *ServiceExpose) MarshalTo(dAtA []byte) (int, error)

func (*ServiceExpose) MarshalToSizedBuffer

func (m *ServiceExpose) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ServiceExpose) ProtoMessage

func (*ServiceExpose) ProtoMessage()

func (*ServiceExpose) Reset

func (m *ServiceExpose) Reset()

func (*ServiceExpose) Size

func (m *ServiceExpose) Size() (n int)

func (*ServiceExpose) String

func (this *ServiceExpose) String() string

func (*ServiceExpose) Unmarshal

func (m *ServiceExpose) Unmarshal(dAtA []byte) error

func (*ServiceExpose) XXX_DiscardUnknown

func (m *ServiceExpose) XXX_DiscardUnknown()

func (*ServiceExpose) XXX_Marshal

func (m *ServiceExpose) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServiceExpose) XXX_Merge

func (m *ServiceExpose) XXX_Merge(src proto.Message)

func (*ServiceExpose) XXX_Size

func (m *ServiceExpose) XXX_Size() int

func (*ServiceExpose) XXX_Unmarshal

func (m *ServiceExpose) XXX_Unmarshal(b []byte) error

type ServiceExposeHTTPOptions

type ServiceExposeHTTPOptions struct {
	MaxBodySize uint32   `protobuf:"varint,1,opt,name=max_body_size,json=maxBodySize,proto3" json:"maxBodySize" yaml:"maxBodySize"`
	ReadTimeout uint32   `protobuf:"varint,2,opt,name=read_timeout,json=readTimeout,proto3" json:"readTimeout" yaml:"readTimeout"`
	SendTimeout uint32   `protobuf:"varint,3,opt,name=send_timeout,json=sendTimeout,proto3" json:"sendTimeout" yaml:"sendTimeout"`
	NextTries   uint32   `protobuf:"varint,4,opt,name=next_tries,json=nextTries,proto3" json:"nextTries" yaml:"nextTries"`
	NextTimeout uint32   `protobuf:"varint,5,opt,name=next_timeout,json=nextTimeout,proto3" json:"nextTimeout" yaml:"nextTimeout"`
	NextCases   []string `protobuf:"bytes,6,rep,name=next_cases,json=nextCases,proto3" json:"nextCases" yaml:"nextCases"`
}

ServiceExposeHTTPOptions

func (*ServiceExposeHTTPOptions) Descriptor

func (*ServiceExposeHTTPOptions) Descriptor() ([]byte, []int)

func (*ServiceExposeHTTPOptions) GetMaxBodySize

func (m *ServiceExposeHTTPOptions) GetMaxBodySize() uint32

func (*ServiceExposeHTTPOptions) GetNextCases

func (m *ServiceExposeHTTPOptions) GetNextCases() []string

func (*ServiceExposeHTTPOptions) GetNextTimeout

func (m *ServiceExposeHTTPOptions) GetNextTimeout() uint32

func (*ServiceExposeHTTPOptions) GetNextTries

func (m *ServiceExposeHTTPOptions) GetNextTries() uint32

func (*ServiceExposeHTTPOptions) GetReadTimeout

func (m *ServiceExposeHTTPOptions) GetReadTimeout() uint32

func (*ServiceExposeHTTPOptions) GetSendTimeout

func (m *ServiceExposeHTTPOptions) GetSendTimeout() uint32

func (*ServiceExposeHTTPOptions) Marshal

func (m *ServiceExposeHTTPOptions) Marshal() (dAtA []byte, err error)

func (*ServiceExposeHTTPOptions) MarshalTo

func (m *ServiceExposeHTTPOptions) MarshalTo(dAtA []byte) (int, error)

func (*ServiceExposeHTTPOptions) MarshalToSizedBuffer

func (m *ServiceExposeHTTPOptions) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ServiceExposeHTTPOptions) ProtoMessage

func (*ServiceExposeHTTPOptions) ProtoMessage()

func (*ServiceExposeHTTPOptions) Reset

func (m *ServiceExposeHTTPOptions) Reset()

func (*ServiceExposeHTTPOptions) Size

func (m *ServiceExposeHTTPOptions) Size() (n int)

func (*ServiceExposeHTTPOptions) String

func (this *ServiceExposeHTTPOptions) String() string

func (*ServiceExposeHTTPOptions) Unmarshal

func (m *ServiceExposeHTTPOptions) Unmarshal(dAtA []byte) error

func (*ServiceExposeHTTPOptions) XXX_DiscardUnknown

func (m *ServiceExposeHTTPOptions) XXX_DiscardUnknown()

func (*ServiceExposeHTTPOptions) XXX_Marshal

func (m *ServiceExposeHTTPOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServiceExposeHTTPOptions) XXX_Merge

func (m *ServiceExposeHTTPOptions) XXX_Merge(src proto.Message)

func (*ServiceExposeHTTPOptions) XXX_Size

func (m *ServiceExposeHTTPOptions) XXX_Size() int

func (*ServiceExposeHTTPOptions) XXX_Unmarshal

func (m *ServiceExposeHTTPOptions) XXX_Unmarshal(b []byte) error

type ServiceParams

type ServiceParams struct {
	Storage []StorageParams `protobuf:"bytes,1,rep,name=storage,proto3" json:"storage" yaml:"storage"`
}

ServiceParams

func (*ServiceParams) Descriptor

func (*ServiceParams) Descriptor() ([]byte, []int)

func (*ServiceParams) GetStorage

func (m *ServiceParams) GetStorage() []StorageParams

func (*ServiceParams) Marshal

func (m *ServiceParams) Marshal() (dAtA []byte, err error)

func (*ServiceParams) MarshalTo

func (m *ServiceParams) MarshalTo(dAtA []byte) (int, error)

func (*ServiceParams) MarshalToSizedBuffer

func (m *ServiceParams) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ServiceParams) ProtoMessage

func (*ServiceParams) ProtoMessage()

func (*ServiceParams) Reset

func (m *ServiceParams) Reset()

func (*ServiceParams) Size

func (m *ServiceParams) Size() (n int)

func (*ServiceParams) String

func (this *ServiceParams) String() string

func (*ServiceParams) Unmarshal

func (m *ServiceParams) Unmarshal(dAtA []byte) error

func (*ServiceParams) XXX_DiscardUnknown

func (m *ServiceParams) XXX_DiscardUnknown()

func (*ServiceParams) XXX_Marshal

func (m *ServiceParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServiceParams) XXX_Merge

func (m *ServiceParams) XXX_Merge(src proto.Message)

func (*ServiceParams) XXX_Size

func (m *ServiceParams) XXX_Size() int

func (*ServiceParams) XXX_Unmarshal

func (m *ServiceParams) XXX_Unmarshal(b []byte) error

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 Services

type Services []Service

type StorageParams

type StorageParams struct {
	Name     string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" yaml:"name"`
	Mount    string `protobuf:"bytes,2,opt,name=mount,proto3" json:"mount" yaml:"mount"`
	ReadOnly bool   `protobuf:"varint,3,opt,name=read_only,json=readOnly,proto3" json:"readOnly" yaml:"readOnly"`
}

StorageParams

func (*StorageParams) Descriptor

func (*StorageParams) Descriptor() ([]byte, []int)

func (*StorageParams) GetMount

func (m *StorageParams) GetMount() string

func (*StorageParams) GetName

func (m *StorageParams) GetName() string

func (*StorageParams) GetReadOnly

func (m *StorageParams) GetReadOnly() bool

func (*StorageParams) Marshal

func (m *StorageParams) Marshal() (dAtA []byte, err error)

func (*StorageParams) MarshalTo

func (m *StorageParams) MarshalTo(dAtA []byte) (int, error)

func (*StorageParams) MarshalToSizedBuffer

func (m *StorageParams) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*StorageParams) ProtoMessage

func (*StorageParams) ProtoMessage()

func (*StorageParams) Reset

func (m *StorageParams) Reset()

func (*StorageParams) Size

func (m *StorageParams) Size() (n int)

func (*StorageParams) String

func (this *StorageParams) String() string

func (*StorageParams) Unmarshal

func (m *StorageParams) Unmarshal(dAtA []byte) error

func (*StorageParams) XXX_DiscardUnknown

func (m *StorageParams) XXX_DiscardUnknown()

func (*StorageParams) XXX_Marshal

func (m *StorageParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StorageParams) XXX_Merge

func (m *StorageParams) XXX_Merge(src proto.Message)

func (*StorageParams) XXX_Size

func (m *StorageParams) XXX_Size() int

func (*StorageParams) XXX_Unmarshal

func (m *StorageParams) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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