Documentation
¶
Index ¶
- Constants
- func IsObject(obj KubernetesResource) bool
- func SetID(obj *KubernetesResource)
- type ExecObject
- type ExecRequest
- type ExecRequests
- type K8SService
- type KubernetesKeyValue
- type KubernetesResource
- type KubernetesResourceObjectMeta
- type KubernetesResourceSpec
- type KubernetesResourceStatus
- type LogObject
- type LogRequest
- type LogRequests
- type ProcessFunc
Constants ¶
View Source
const ( KindLabel string = "label" KindAnnotation string = "annotation" )
Variables ¶
This section is empty.
Functions ¶
func IsObject ¶ added in v0.1.9
func IsObject(obj KubernetesResource) bool
func SetID ¶ added in v0.1.12
func SetID(obj *KubernetesResource)
Types ¶
type ExecObject ¶ added in v0.1.20
type ExecRequest ¶ added in v0.1.20
type ExecRequests ¶ added in v0.1.20
type ExecRequests map[string]ExecRequest
type K8SService ¶ added in v0.7.1
type K8SService struct{}
func (*K8SService) Process ¶ added in v0.7.1
func (s *K8SService) Process(data []byte, k8sresource *KubernetesResource, evtype broker.EventType) error
type KubernetesKeyValue ¶ added in v0.6.20
type KubernetesResource ¶
type KubernetesResource struct { ID string `json:"id" gorm:"primarykey"` APIVersion string `json:"apiVersion" gorm:"index"` Kind string `json:"kind" gorm:"index"` Model string `json:"model" gorm:"index"` KubernetesResourceMeta *KubernetesResourceObjectMeta `json:"metadata" gorm:"foreignkey:ID;references:id;constraint:OnUpdate:CASCADE,OnDelete:SET NULL;"` Spec *KubernetesResourceSpec `json:"spec,omitempty" gorm:"foreignkey:ID;references:id;constraint:OnUpdate:CASCADE,OnDelete:SET NULL;"` Status *KubernetesResourceStatus `json:"status,omitempty" gorm:"foreignkey:ID;references:id;constraint:OnUpdate:CASCADE,OnDelete:SET NULL;"` ClusterID string `json:"cluster_id"` PatternResource *uuid.UUID `json:"pattern_resource"` ComponentMetadata map[string]interface{} `json:"component_metadata" gorm:"type:bytes;serializer:json"` // Secondary fields for configsmaps and secrets Immutable string `json:"immutable,omitempty"` Data string `json:"data,omitempty"` BinaryData string `json:"binaryData,omitempty"` StringData string `json:"stringData,omitempty"` Type string `json:"type,omitempty"` }
func ParseList ¶ added in v0.1.7
func ParseList(object unstructured.Unstructured, eventType broker.EventType) KubernetesResource
func (*KubernetesResource) BeforeCreate ¶ added in v0.6.20
func (obj *KubernetesResource) BeforeCreate(tx *gorm.DB) (err error)
func (*KubernetesResource) BeforeDelete ¶ added in v0.6.20
func (obj *KubernetesResource) BeforeDelete(tx *gorm.DB) (err error)
func (*KubernetesResource) BeforeSave ¶ added in v0.6.20
func (obj *KubernetesResource) BeforeSave(tx *gorm.DB) (err error)
type KubernetesResourceObjectMeta ¶
type KubernetesResourceObjectMeta struct { ID string `json:"id" gorm:"primarykey"` Name string `json:"name,omitempty" gorm:"index"` GenerateName string `json:"generateName,omitempty"` Namespace string `json:"namespace,omitempty"` SelfLink string `json:"selfLink,omitempty"` UID string `json:"uid"` ResourceVersion string `json:"resourceVersion,omitempty"` Generation int64 `json:"generation,omitempty"` CreationTimestamp string `json:"creationTimestamp,omitempty"` DeletionTimestamp string `json:"deletionTimestamp,omitempty"` DeletionGracePeriodSeconds *int64 `json:"deletionGracePeriodSeconds,omitempty"` Labels []*KubernetesKeyValue `json:"labels,omitempty" gorm:"foreignkey:ID;references:id;constraint:OnUpdate:CASCADE,OnDelete:SET NULL;"` Annotations []*KubernetesKeyValue `json:"annotations,omitempty" gorm:"foreignkey:ID;references:id;constraint:OnUpdate:CASCADE,OnDelete:SET NULL;"` OwnerReferences string `json:"ownerReferences,omitempty" gorm:"-"` Finalizers string `json:"finalizers,omitempty" gorm:"-"` ClusterName string `json:"clusterName,omitempty"` ManagedFields string `json:"managedFields,omitempty" gorm:"-"` ClusterID string `json:"cluster_id"` }
type KubernetesResourceSpec ¶
type LogRequest ¶ added in v0.1.18
type LogRequest struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Namespace string `json:"namespace,omitempty"` Container string `json:"container,omitempty"` Follow bool `json:"follow,omitempty"` Previous bool `json:"previous,omitempty"` TailLines int64 `json:"taillines,omitempty"` Stop bool `json:"stop,omitempty"` }
type LogRequests ¶ added in v0.1.18
type LogRequests map[string]LogRequest
type ProcessFunc ¶ added in v0.7.1
type ProcessFunc interface {
Process(obj []byte, k8sresource *KubernetesResource, evtype broker.EventType) error
}
func GetProcessorInstance ¶ added in v0.7.1
func GetProcessorInstance(kind string) ProcessFunc
Click to show internal directories.
Click to hide internal directories.