k8sv1

package
v0.0.0-...-d96e350 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_config_service_k8s_v1_k8s_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Config

type Config struct {

	// A list of paths for `kubeconfig` files. Each config will be read and each context will become a clientset
	// in the clientset manager. If no files are provided, the service will use the K8s SDK default loading rules
	// which are detailed here: https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/,
	// i.e. look for configs:
	// - in a comma-separated `KUBECONFIG` environment variable
	// - else `$HOME/.kube/config`
	// - else in-cluster config
	// https://github.com/kubernetes/client-go/tree/master/examples/in-cluster-client-configuration
	Kubeconfigs      []string          `protobuf:"bytes,1,rep,name=kubeconfigs,proto3" json:"kubeconfigs,omitempty"`
	RestClientConfig *RestClientConfig `protobuf:"bytes,2,opt,name=rest_client_config,json=restClientConfig,proto3" json:"rest_client_config,omitempty"`
	// contains filtered or unexported fields
}

func (*Config) Descriptor deprecated

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

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetKubeconfigs

func (x *Config) GetKubeconfigs() []string

func (*Config) GetRestClientConfig

func (x *Config) GetRestClientConfig() *RestClientConfig

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

func (x *Config) ProtoReflect() protoreflect.Message

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

func (*Config) Validate

func (m *Config) Validate() error

Validate checks the field values on Config with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Config) ValidateAll

func (m *Config) ValidateAll() error

ValidateAll checks the field values on Config with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ConfigMultiError, or nil if none found.

type ConfigMultiError

type ConfigMultiError []error

ConfigMultiError is an error wrapping multiple validation errors returned by Config.ValidateAll() if the designated constraints aren't met.

func (ConfigMultiError) AllErrors

func (m ConfigMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ConfigMultiError) Error

func (m ConfigMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type ConfigValidationError

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

ConfigValidationError is the validation error returned by Config.Validate if the designated constraints aren't met.

func (ConfigValidationError) Cause

func (e ConfigValidationError) Cause() error

Cause function returns cause value.

func (ConfigValidationError) Error

func (e ConfigValidationError) Error() string

Error satisfies the builtin error interface

func (ConfigValidationError) ErrorName

func (e ConfigValidationError) ErrorName() string

ErrorName returns error name.

func (ConfigValidationError) Field

func (e ConfigValidationError) Field() string

Field function returns field value.

func (ConfigValidationError) Key

func (e ConfigValidationError) Key() bool

Key function returns key value.

func (ConfigValidationError) Reason

func (e ConfigValidationError) Reason() string

Reason function returns reason value.

type RestClientConfig

type RestClientConfig struct {

	// The maximum length of time to wait before giving up on a server request.
	// By default a value of zero means no timeout.
	// https://github.com/kubernetes/client-go/blob/00dbcca6ee44c678754d3f5fda1bd0e704b26fe2/rest/config.go#L130-L131
	Timeout *durationpb.Duration `protobuf:"bytes,1,opt,name=timeout,proto3" json:"timeout,omitempty"`
	// QPS indicates the maximum QPS to the master from this client.
	// If it's zero, the created RESTClient will use DefaultQPS: 5
	// https://github.com/kubernetes/client-go/blob/00dbcca6ee44c678754d3f5fda1bd0e704b26fe2/rest/config.go#L115-L117
	Qps float32 `protobuf:"fixed32,2,opt,name=qps,proto3" json:"qps,omitempty"`
	// Maximum burst for throttle.
	// If it's zero, the created RESTClient will use DefaultBurst: 10.
	// https://github.com/kubernetes/client-go/blob/00dbcca6ee44c678754d3f5fda1bd0e704b26fe2/rest/config.go#L119-L121
	Burst uint32 `protobuf:"varint,3,opt,name=burst,proto3" json:"burst,omitempty"`
	// contains filtered or unexported fields
}

These configuration values are passed directly through to the rest config object.

func (*RestClientConfig) Descriptor deprecated

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

Deprecated: Use RestClientConfig.ProtoReflect.Descriptor instead.

func (*RestClientConfig) GetBurst

func (x *RestClientConfig) GetBurst() uint32

func (*RestClientConfig) GetQps

func (x *RestClientConfig) GetQps() float32

func (*RestClientConfig) GetTimeout

func (x *RestClientConfig) GetTimeout() *durationpb.Duration

func (*RestClientConfig) ProtoMessage

func (*RestClientConfig) ProtoMessage()

func (*RestClientConfig) ProtoReflect

func (x *RestClientConfig) ProtoReflect() protoreflect.Message

func (*RestClientConfig) Reset

func (x *RestClientConfig) Reset()

func (*RestClientConfig) String

func (x *RestClientConfig) String() string

func (*RestClientConfig) Validate

func (m *RestClientConfig) Validate() error

Validate checks the field values on RestClientConfig with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*RestClientConfig) ValidateAll

func (m *RestClientConfig) ValidateAll() error

ValidateAll checks the field values on RestClientConfig with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RestClientConfigMultiError, or nil if none found.

type RestClientConfigMultiError

type RestClientConfigMultiError []error

RestClientConfigMultiError is an error wrapping multiple validation errors returned by RestClientConfig.ValidateAll() if the designated constraints aren't met.

func (RestClientConfigMultiError) AllErrors

func (m RestClientConfigMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (RestClientConfigMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type RestClientConfigValidationError

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

RestClientConfigValidationError is the validation error returned by RestClientConfig.Validate if the designated constraints aren't met.

func (RestClientConfigValidationError) Cause

Cause function returns cause value.

func (RestClientConfigValidationError) Error

Error satisfies the builtin error interface

func (RestClientConfigValidationError) ErrorName

ErrorName returns error name.

func (RestClientConfigValidationError) Field

Field function returns field value.

func (RestClientConfigValidationError) Key

Key function returns key value.

func (RestClientConfigValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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