external

package
v1.3.11 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2026 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DependencyCheckTimeout = 5 * time.Second

Functions

func CheckKafka

func CheckKafka(conf CheckKafkaConfig) error

func CheckMinIO

func CheckMinIO(args CheckMinIOArgs) error

func GetKafkaDialer

func GetKafkaDialer(conf CheckKafkaConfig) (*kafka.Dialer, error)

GetKafkaDialer returns a kafka.Dialer with TLS and SASL configured. Behavior:

  • Protocol & mechanism are case-insensitive.
  • PLAIN SASL does NOT hard-fail on empty creds (matches UT).
  • SCRAM requires non-empty creds (will error otherwise).

Types

type CheckKafkaConfig

type CheckKafkaConfig struct {
	SecretReader       func(ns, name, key string) ([]byte, error) `json:"-"`
	CACert             []byte                                     `json:"-"`
	Namespace          string                                     `json:"-"` // CR namespace; used as fallback for Secret refs
	BrokerList         []string                                   `json:"-"`
	SecurityProtocol   string                                     `json:"securityProtocol"`
	SASLMechanisms     string                                     `json:"saslMechanisms"`
	SASLUsername       string                                     `json:"saslUsername,omitempty"` // fallback if Secret not set
	SASLPassword       string                                     `json:"saslPassword,omitempty"` // fallback if Secret not set
	SASLUsernameSecret *SecretKeyRef                              `json:"saslUsernameSecret,omitempty"`
	SASLPasswordSecret *SecretKeyRef                              `json:"saslPasswordSecret,omitempty"`
	SSL                SSLConfig                                  `json:"ssl,omitempty"`
}

func GetKafkaConfFromCR

func GetKafkaConfFromCR(mc v1beta1.Milvus) (*CheckKafkaConfig, error)

GetKafkaConfFromCR get check kafka config from CR

type CheckMinIOArgs

type CheckMinIOArgs struct {
	// S3 / MinIO
	Type           string
	AK             string
	SK             string
	Bucket         string
	Endpoint       string
	UseSSL         bool
	UseIAM         bool
	IAMEndpoint    string
	UseVirtualHost bool
	// SSL Configuration
	CACertificate      []byte
	InsecureSkipVerify bool
}

CheckMinIOArgs is info for acquiring storage condition

type ConditionGetter

type ConditionGetter interface {
	GetCondition() v1beta1.MilvusCondition
}

type PulsarConditionGetter

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

func NewPulsarConditionGetter

func NewPulsarConditionGetter(m *v1beta1.Milvus) *PulsarConditionGetter

func (PulsarConditionGetter) GetCondition

type SSLConfig added in v1.3.11

type SSLConfig struct {
	Enabled           bool          `json:"enabled"`
	CACertSecret      *SecretKeyRef `json:"caCertSecret,omitempty"`
	CertSecret        *SecretKeyRef `json:"certSecret,omitempty"`        // optional: mTLS
	KeySecret         *SecretKeyRef `json:"keySecret,omitempty"`         // optional: mTLS
	KeyPasswordSecret *SecretKeyRef `json:"keyPasswordSecret,omitempty"` // optional
}

func (*SSLConfig) UnmarshalJSON added in v1.3.11

func (c *SSLConfig) UnmarshalJSON(data []byte) error

UnmarshalJSON accepts the bool and string forms supported by Milvus config.

type SecretKeyRef added in v1.3.11

type SecretKeyRef struct {
	Name      string `json:"name"`
	Key       string `json:"key"`
	Namespace string `json:"namespace,omitempty"` // default: CR's namespace
}

type TCPDialConditionGetter

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

func NewTCPDialConditionGetter

func NewTCPDialConditionGetter(conditionType v1beta1.MilvusConditionType, tcpAddrs []string) *TCPDialConditionGetter

func (*TCPDialConditionGetter) GetCondition

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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