Documentation
¶
Index ¶
- Constants
- Variables
- func AbbrevStr(in string, length int) string
- func AppendIfNotNil[T any](arr []T, v T) []T
- type DriverNotSupportedError
- type K8sResourceInfo
- type NetworkNotSupportedError
- type NoticeImportance
- type NoticeItem
- type Notices
- type StructuredResponse
- type TranslateError
- type Translator
Constants ¶
View Source
const ( DefaultChangeMode = "restart" ReloaderConfigMapAnnotationKey = "configmap.reloader.stakater.com/reload" ReloaderSecretAnnotationKey = "secret.reloader.stakater.com/reload" )
Variables ¶
View Source
var ( ErrNoToken = errors.New("openai token missing, set envvar OPENAI_TOKEN") ErrGenerationUnparsable = errors.New("the generated output is not parsable") )
View Source
var ( ErrNoNetworkBlock = errors.New("network mode has to be provided") ErrOnlyContainerSupport = errors.New("pod only support container") )
Functions ¶
func AppendIfNotNil ¶
func AppendIfNotNil[T any](arr []T, v T) []T
Types ¶
type DriverNotSupportedError ¶
type DriverNotSupportedError struct {
Type string
}
func (*DriverNotSupportedError) Error ¶
func (de *DriverNotSupportedError) Error() string
type K8sResourceInfo ¶
type K8sResourceInfo struct {
metav1.TypeMeta `json:",inline"`
// Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
}
type NetworkNotSupportedError ¶
type NetworkNotSupportedError struct {
Type string
}
func (*NetworkNotSupportedError) Error ¶
func (ne *NetworkNotSupportedError) Error() string
type NoticeImportance ¶
type NoticeImportance int
const ( NoticeBroken NoticeImportance = iota NoticeImportant NoticeInformative )
func (NoticeImportance) String ¶
func (ni NoticeImportance) String() string
type NoticeItem ¶
type NoticeItem struct {
Importance NoticeImportance
Msg string
}
type StructuredResponse ¶
type StructuredResponse struct {
Result vsov1.VaultStaticSecret `yaml:"result" json:"result"`
Confidence float32 `yaml:"confidence" json:"confidence"`
Explanation string `yaml:"explanation" json:"explanation"`
}
type TranslateError ¶
func (*TranslateError) Error ¶
func (te *TranslateError) Error() string
type Translator ¶
type Translator struct {
DestPath string
NamePrefix string
Job *api.Job
Notices Notices
K8sCRs []client.Object
K8sDeployemnts []*v1.Deployment
// When Generation CMs, the name could collide based on the original nomad template
// destination attribute
// thus using a map to better test collision than slice
K8sConfigMaps map[string]*corev1.ConfigMap
K8sSecret map[string]*corev1.Secret
K8sServices []*corev1.Service
K8sHTTPRoute []*gwv1.HTTPRoute
}
func (*Translator) GetNamePrefix ¶
func (t *Translator) GetNamePrefix() string
func (*Translator) Process ¶
func (t *Translator) Process() error
func (*Translator) ProcessTaskGroup ¶
func (t *Translator) ProcessTaskGroup(tg *api.TaskGroup) error
Click to show internal directories.
Click to hide internal directories.