Documentation ¶
Index ¶
- Constants
- func Append(originXml string, properties []XmlNameValuePair) string
- func ConvertToResourceRequirements(resources *kafkav1alpha1.ResourcesSpec) *corev1.ResourceRequirements
- func CreateOrUpdate(ctx context.Context, c client.Client, obj client.Object) (bool, error)
- func CreateVectorShutdownFileCommand(logDir string) string
- func ImagePullPolicy(imagespec *kafkav1alpha1.ImageSpec) corev1.PullPolicy
- func ImageRepository(imagespec *kafkav1alpha1.ImageSpec) string
- func MakeConfigFileContent(config map[string]string) string
- func MakePropertiesFileContent(config map[string]string) string
- func OverrideConfigFileContent(current string, override string) string
- func OverrideProperties(override []NameValuePair, current *[]NameValuePair)
- func OverridePropertiesFileContent(current string, override []NameValuePair) (string, error)
- func OverrideXmlContent(current string, overrideProperties map[string]string) string
- func QuantityToMB(quantity resource.Quantity) float64
- func RemoveVectorShutdownFileCommand(logDir string) string
- func ScanProperties(current string, properties *[]NameValuePair) error
- func ToProperties(conf map[string]string) string
- type Map
- type NameValuePair
- type ResourceNameGenerator
- type SecretVolumeBuilder
- type XmlConfiguration
- type XmlNameValuePair
Constants ¶
const ( VectorLogDir = "_vector" // File to signal that Vector should be gracefully shut down ShutdownFile = "shutdown" )
Subdirectory of the log directory containing files to control the Vector instance
const CommonBashTrapFunctions = `` /* 542-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func Append ¶
func Append(originXml string, properties []XmlNameValuePair) string
Append to exist xml dom
func ConvertToResourceRequirements ¶
func ConvertToResourceRequirements(resources *kafkav1alpha1.ResourcesSpec) *corev1.ResourceRequirements
func CreateOrUpdate ¶
func CreateVectorShutdownFileCommand ¶
Command to create a shutdown file for the vector container. Please delete it before starting your application using `RemoveVectorShutdownFileCommand` .
func ImagePullPolicy ¶
func ImagePullPolicy(imagespec *kafkav1alpha1.ImageSpec) corev1.PullPolicy
func ImageRepository ¶
func ImageRepository(imagespec *kafkav1alpha1.ImageSpec) string
func MakeConfigFileContent ¶
MakeConfigFileContent returns the content of a configuration file content such as: ``` key1 value1 key2 value2 ```
func MakePropertiesFileContent ¶
MakePropertiesFileContent returns the content of a properties file content such as: ```properties key1=value1 key2=value2 ```
func OverrideProperties ¶
func OverrideProperties(override []NameValuePair, current *[]NameValuePair)
func OverridePropertiesFileContent ¶
func OverridePropertiesFileContent(current string, override []NameValuePair) (string, error)
OverridePropertiesFileContent use bufio resolve properties
func OverrideXmlContent ¶
OverrideXmlContent overrides the content of a xml file append the override properties to the current xml dom
func QuantityToMB ¶
func RemoveVectorShutdownFileCommand ¶
/ Use this command to remove the shutdown file (if it exists) created by [`create_vector_shutdown_file_command`]. / You should execute this command before starting your application.
func ScanProperties ¶
func ScanProperties(current string, properties *[]NameValuePair) error
func ToProperties ¶
convert map to properties string
Types ¶
type NameValuePair ¶
type ResourceNameGenerator ¶
func NewResourceNameGenerator ¶
func NewResourceNameGenerator(instanceName, roleName, groupName string) *ResourceNameGenerator
NewResourceNameGenerator new a ResourceNameGenerator
func NewResourceNameGeneratorOneRole ¶
func NewResourceNameGeneratorOneRole(instanceName, groupName string) *ResourceNameGenerator
NewResourceNameGeneratorOneRole new a ResourceNameGenerator without roleName
func (*ResourceNameGenerator) GenerateResourceName ¶
func (r *ResourceNameGenerator) GenerateResourceName(extraSuffix string) string
GenerateResourceName generate resource Name
type SecretVolumeBuilder ¶
type SecretVolumeBuilder struct { VolumeName string // contains filtered or unexported fields }
func (*SecretVolumeBuilder) AddAnnotation ¶
func (s *SecretVolumeBuilder) AddAnnotation(key, value string) *SecretVolumeBuilder
add annotation
func (*SecretVolumeBuilder) SetAnnotations ¶
func (s *SecretVolumeBuilder) SetAnnotations(annotations map[string]string) *SecretVolumeBuilder
set annotaions
type XmlConfiguration ¶
type XmlConfiguration struct { XMLName xml.Name `xml:"configuration"` Properties []XmlNameValuePair `xml:"property"` }
func NewXmlConfiguration ¶
func NewXmlConfiguration(properties []XmlNameValuePair) *XmlConfiguration
func (*XmlConfiguration) DistinctProperties ¶
func (c *XmlConfiguration) DistinctProperties(properties []XmlNameValuePair) []XmlNameValuePair
DistinctProperties distinct properties by name,
func (*XmlConfiguration) String ¶
func (c *XmlConfiguration) String(properties []XmlNameValuePair) string
func (*XmlConfiguration) StringWithProperties ¶
func (c *XmlConfiguration) StringWithProperties(properties map[string]string) string