v2beta3

package
v0.0.2-rc3 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

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

Variables

View Source
var (
	ErrInvalidManifest         = errors.New("invalid manifest")
	ErrManifestCrossValidation = errors.New("manifest cross-validation error")
)
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 (
	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

This section is empty.

Types

type Group

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

Group store name and list of services

func (Group) AllHostnames

func (g Group) AllHostnames() []string

func (*Group) Descriptor

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

func (Group) GetName

func (g Group) GetName() string

GetName returns the name of group

func (Group) GetResourceUnits

func (g Group) GetResourceUnits() dtypes.ResourceUnits

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) Validate

func (g *Group) Validate(helper *validateManifestGroupsHelper) 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 Groups

type Groups []Group

func (Groups) CheckAgainstGSpecs

func (groups Groups) CheckAgainstGSpecs(gspecs dtypes.GroupSpecs) error

func (Groups) Validate

func (groups Groups) Validate() error

type ImageCredentials

type ImageCredentials struct {
	Host     string `protobuf:"bytes,1,opt,name=host,proto3" json:"host" yaml:"host"`
	Email    string `protobuf:"bytes,2,opt,name=email,proto3" json:"email" yaml:"email"`
	Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username" yaml:"username"`
	Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password" yaml:"password"`
}

Credentials to fetch image from registry

func (*ImageCredentials) Descriptor

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

func (*ImageCredentials) GetEmail

func (m *ImageCredentials) GetEmail() string

func (*ImageCredentials) GetHost

func (m *ImageCredentials) GetHost() string

func (*ImageCredentials) GetPassword

func (m *ImageCredentials) GetPassword() string

func (*ImageCredentials) GetUsername

func (m *ImageCredentials) GetUsername() string

func (*ImageCredentials) Marshal

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

func (*ImageCredentials) MarshalTo

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

func (*ImageCredentials) MarshalToSizedBuffer

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

func (*ImageCredentials) ProtoMessage

func (*ImageCredentials) ProtoMessage()

func (*ImageCredentials) Reset

func (m *ImageCredentials) Reset()

func (*ImageCredentials) Size

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

func (*ImageCredentials) String

func (this *ImageCredentials) String() string

func (*ImageCredentials) Unmarshal

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

func (*ImageCredentials) XXX_DiscardUnknown

func (m *ImageCredentials) XXX_DiscardUnknown()

func (*ImageCredentials) XXX_Marshal

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

func (*ImageCredentials) XXX_Merge

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

func (*ImageCredentials) XXX_Size

func (m *ImageCredentials) XXX_Size() int

func (*ImageCredentials) XXX_Unmarshal

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

type Manifest

type Manifest Groups

Manifest store list of groups

func (Manifest) CheckAgainstDeployment

func (m Manifest) CheckAgainstDeployment(dgroups []dtypes.Group) error

func (Manifest) CheckAgainstGSpecs

func (m Manifest) CheckAgainstGSpecs(gspecs dtypes.GroupSpecs) error

func (Manifest) GetGroups

func (m Manifest) GetGroups() Groups

GetGroups returns a manifest with groups list

func (Manifest) Validate

func (m Manifest) Validate() error

Validate does validation for manifest

func (Manifest) Version

func (m Manifest) Version() ([]byte, error)

Version calculates the identifying deterministic hash for an SDL. Sha256 returns 32 byte sum of the SDL.

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   v1beta4.Resources `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      ServiceExposes    `protobuf:"bytes,8,rep,name=expose,proto3,castrepeated=ServiceExposes" json:"expose" yaml:"expose"`
	Params      *ServiceParams    `protobuf:"bytes,9,opt,name=params,proto3" json:"params,omitempty" yaml:"params,omitempty"`
	Credentials *ImageCredentials `protobuf:"bytes,10,opt,name=credentials,proto3" json:"credentials" yaml:"credentials"`
}

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) GetCredentials

func (m *Service) GetCredentials() *ImageCredentials

func (*Service) GetEnv

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

func (*Service) GetExpose

func (m *Service) GetExpose() ServiceExposes

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() v1beta4.Resources

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) GetEndpoints

func (s *ServiceExpose) GetEndpoints() resources.Endpoints

func (*ServiceExpose) GetExternalPort

func (s *ServiceExpose) GetExternalPort() uint32

func (*ServiceExpose) IsIngress

func (s *ServiceExpose) IsIngress() bool

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,omitempty" yaml:"nextCases,omitempty"`
}

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 ServiceExposes

type ServiceExposes []ServiceExpose

func (ServiceExposes) GetEndpoints

func (s ServiceExposes) GetEndpoints() resources.Endpoints

func (ServiceExposes) Len

func (s ServiceExposes) Len() int

func (ServiceExposes) Less

func (s ServiceExposes) Less(i, j int) bool

func (ServiceExposes) Swap

func (s ServiceExposes) Swap(i, j int)

type ServiceParams

type ServiceParams struct {
	Storage     []StorageParams   `protobuf:"bytes,1,rep,name=storage,proto3" json:"storage" yaml:"storage"`
	Credentials *ImageCredentials `protobuf:"bytes,10,opt,name=credentials,proto3" json:"credentials,omitempty" yaml:"credentials,omitempty"`
}

ServiceParams

func (*ServiceParams) Descriptor

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

func (*ServiceParams) GetCredentials

func (m *ServiceParams) GetCredentials() *ImageCredentials

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

func (Services) Len

func (s Services) Len() int

func (Services) Less

func (s Services) Less(i, j int) bool

func (Services) Swap

func (s Services) Swap(i, j int)

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