Documentation ¶
Index ¶
- Constants
- Variables
- type BaseResourceEventHandler
- type Controller
- type Entity
- type EntityType
- type EventSpan
- type EventTrace
- type Events
- type GitopsSpan
- type GitopsTrace
- func (t *GitopsTrace) AddSpan(span GitopsSpan)
- func (t GitopsTrace) GetSpan(spanID trace.SpanID) (*GitopsSpan, bool)
- func (t GitopsTrace) GetSpanFor(pr PullRequest) (*GitopsSpan, bool)
- func (t *GitopsTrace) IterateOnGitopsSpans(callback func(gitopsSpan *GitopsSpan))
- func (t GitopsTrace) RootSpan() *GitopsSpan
- func (t *GitopsTrace) SpanChildren(spanID trace.SpanID) []*GitopsSpan
- type JenkinsXPipelineActivityHandler
- type KubeEvents
- type KubernetesEventHandler
- type KubernetesPodHandler
- type LighthouseEventHandler
- type LighthouseJobHandler
- type LighthousePullRequestHandler
- type PullRequest
- type Store
- func (s *Store) AddEventTrace(eventTrace *EventTrace)
- func (s *Store) AddGitopsTrace(gitopsTrace GitopsTrace)
- func (s *Store) AddJxPipelineActivity(pa *jxv1.PipelineActivity)
- func (s *Store) AddKubeEvent(event *v1.Event)
- func (s *Store) AddKubePod(pod *v1.Pod)
- func (s *Store) AddLighthouseJob(job *lhv1alpha1.LighthouseJob)
- func (s *Store) AddTknPipelineRun(pr *tknv1beta1.PipelineRun)
- func (s *Store) AddTknTaskRun(tr *tknv1beta1.TaskRun)
- func (s *Store) CollectGarbage()
- func (s *Store) DeleteJxPipelineActivity(paName string)
- func (s *Store) DeleteKubeEventsFor(entity Entity)
- func (s *Store) DeleteKubePod(podName string)
- func (s *Store) DeleteLighthouseJob(jobName string)
- func (s *Store) DeleteTknPipelineRun(prName string)
- func (s *Store) DeleteTknTaskRun(trName string)
- func (s *Store) FindEventTraceByEventGUID(eventGUID string) (*EventTrace, error)
- func (s *Store) FindGitopsTraceAndSpan(pr PullRequest) (*GitopsTrace, *GitopsSpan, error)
- func (s *Store) FindLighthouseJob(labels map[string]string) *lhv1alpha1.LighthouseJob
- func (s *Store) GetEventTrace(traceID trace.TraceID) (*EventTrace, error)
- func (s *Store) GetJxPipelineActivity(paName string) *jxv1.PipelineActivity
- func (s *Store) GetKubeEventsFor(entity Entity) []*v1.Event
- func (s *Store) GetKubePod(podName string) *v1.Pod
- func (s *Store) GetTknPipelineRun(prName string) *tknv1beta1.PipelineRun
- func (s *Store) GetTknTaskRun(trName string) *tknv1beta1.TaskRun
- func (s *Store) IterateOnGitopsTraces(callback func(gitopsTrace *GitopsTrace))
- type TektonPipelineRunHandler
- type TektonTaskRunHandler
Constants ¶
View Source
const ( TraceIDAnnotationKey = "lighthouse.jenkins-x.io/traceID" SpanIDAnnotationKey = "lighthouse.jenkins-x.io/spanID" )
Variables ¶
View Source
var ( ErrEventTraceNotFound = errors.New("the EventTrace could not be found in the Store") ErrGitopsTraceNotFound = errors.New("the GitopsTrace could not be found in the Store") )
View Source
var (
ErrParentEntityNotFound = errors.New("the parent entity could not be found")
)
View Source
var (
ErrTraceNotFound = errors.New("The Trace parent/state could not be found in the annotations")
)
Functions ¶
This section is empty.
Types ¶
type BaseResourceEventHandler ¶
type BaseResourceEventHandler struct { Store *Store SpanExporter exporttrace.SpanExporter Logger *logrus.Logger }
func (BaseResourceEventHandler) TracerProviderFor ¶
func (h BaseResourceEventHandler) TracerProviderFor(attrs ...attribute.KeyValue) trace.TracerProvider
type Controller ¶
type Controller struct { KubeConfig *rest.Config Namespace string ResyncInterval time.Duration ChildPullRequestDelay time.Duration SpanExporter exporttrace.SpanExporter LighthouseHandler *lighthouse.Handler Logger *logrus.Logger }
type Entity ¶
type Entity struct { Type EntityType Name string }
func ObjectReferenceToEntity ¶
func ObjectReferenceToEntity(objectRef v1.ObjectReference) *Entity
type EntityType ¶
type EntityType int
const ( EntityTypeNone EntityType = iota EntityTypeLighthouseJob EntityTypeJxPipelineActivity EntityTypeTknPipelineRun EntityTypeTknTaskRun EntityTypeKubePod EntityTypeKubeEvent )
type EventTrace ¶
type EventTrace struct { EventGUID string RootSpan trace.Span // contains filtered or unexported fields }
func NewEventTrace ¶
func NewEventTrace(eventGUID string, rootSpan trace.Span) *EventTrace
func (*EventTrace) AddSpan ¶
func (t *EventTrace) AddSpan(span EventSpan)
func (EventTrace) EndRootSpanIfNeeded ¶
func (t EventTrace) EndRootSpanIfNeeded(options ...trace.SpanOption)
func (EventTrace) FindSpanFor ¶
func (t EventTrace) FindSpanFor(entityType EntityType, entityName string) (EventSpan, bool)
type GitopsSpan ¶ added in v0.1.0
type GitopsTrace ¶ added in v0.1.0
type GitopsTrace struct {
// contains filtered or unexported fields
}
func NewGitopsTrace ¶ added in v0.1.0
func NewGitopsTrace(rootSpan GitopsSpan) *GitopsTrace
func (*GitopsTrace) AddSpan ¶ added in v0.1.0
func (t *GitopsTrace) AddSpan(span GitopsSpan)
func (GitopsTrace) GetSpan ¶ added in v0.1.0
func (t GitopsTrace) GetSpan(spanID trace.SpanID) (*GitopsSpan, bool)
func (GitopsTrace) GetSpanFor ¶ added in v0.1.0
func (t GitopsTrace) GetSpanFor(pr PullRequest) (*GitopsSpan, bool)
func (*GitopsTrace) IterateOnGitopsSpans ¶ added in v0.1.0
func (t *GitopsTrace) IterateOnGitopsSpans(callback func(gitopsSpan *GitopsSpan))
func (GitopsTrace) RootSpan ¶ added in v0.1.0
func (t GitopsTrace) RootSpan() *GitopsSpan
func (*GitopsTrace) SpanChildren ¶ added in v0.1.0
func (t *GitopsTrace) SpanChildren(spanID trace.SpanID) []*GitopsSpan
type JenkinsXPipelineActivityHandler ¶
type JenkinsXPipelineActivityHandler struct { BaseResourceEventHandler Tracer trace.Tracer PipelineActivityClient jenkinsiov1.PipelineActivityInterface }
func (*JenkinsXPipelineActivityHandler) OnAdd ¶
func (h *JenkinsXPipelineActivityHandler) OnAdd(obj interface{})
func (*JenkinsXPipelineActivityHandler) OnDelete ¶
func (h *JenkinsXPipelineActivityHandler) OnDelete(obj interface{})
func (*JenkinsXPipelineActivityHandler) OnUpdate ¶
func (h *JenkinsXPipelineActivityHandler) OnUpdate(oldObj, newObj interface{})
type KubeEvents ¶
type KubeEvents struct { Events map[string]*v1.Event Names []string // contains filtered or unexported fields }
func (*KubeEvents) AddEvent ¶
func (e *KubeEvents) AddEvent(event *v1.Event)
func (*KubeEvents) GetOrderedEvents ¶
func (e *KubeEvents) GetOrderedEvents() []*v1.Event
type KubernetesEventHandler ¶
type KubernetesEventHandler struct {
BaseResourceEventHandler
}
func (*KubernetesEventHandler) OnAdd ¶
func (h *KubernetesEventHandler) OnAdd(obj interface{})
func (*KubernetesEventHandler) OnDelete ¶
func (h *KubernetesEventHandler) OnDelete(obj interface{})
func (*KubernetesEventHandler) OnUpdate ¶
func (h *KubernetesEventHandler) OnUpdate(oldObj, newObj interface{})
type KubernetesPodHandler ¶
type KubernetesPodHandler struct { BaseResourceEventHandler Tracer trace.Tracer PodClient kv1.PodInterface }
func (*KubernetesPodHandler) OnAdd ¶
func (h *KubernetesPodHandler) OnAdd(obj interface{})
func (*KubernetesPodHandler) OnDelete ¶
func (h *KubernetesPodHandler) OnDelete(obj interface{})
func (*KubernetesPodHandler) OnUpdate ¶
func (h *KubernetesPodHandler) OnUpdate(oldObj, newObj interface{})
type LighthouseEventHandler ¶
type LighthouseEventHandler struct { BaseResourceEventHandler Tracer trace.Tracer }
type LighthouseJobHandler ¶
type LighthouseJobHandler struct { BaseResourceEventHandler Tracer trace.Tracer LighthouseJobClient lighthousev1alpha1.LighthouseJobInterface }
func (*LighthouseJobHandler) OnAdd ¶
func (h *LighthouseJobHandler) OnAdd(obj interface{})
func (*LighthouseJobHandler) OnDelete ¶
func (h *LighthouseJobHandler) OnDelete(obj interface{})
func (*LighthouseJobHandler) OnUpdate ¶
func (h *LighthouseJobHandler) OnUpdate(oldObj, newObj interface{})
type LighthousePullRequestHandler ¶ added in v0.1.0
type LighthousePullRequestHandler struct { BaseResourceEventHandler Tracer trace.Tracer ChildPullRequestDelay time.Duration }
func (*LighthousePullRequestHandler) Start ¶ added in v0.1.0
func (h *LighthousePullRequestHandler) Start(stopCh <-chan struct{})
type PullRequest ¶ added in v0.1.0
func (PullRequest) String ¶ added in v0.1.0
func (p PullRequest) String() string
type Store ¶
type Store struct { LighthouseJobClient lighthousev1alpha1.LighthouseJobInterface JxPipelineActivityClient jenkinsiov1.PipelineActivityInterface TknPipelineRunClient tektonv1beta1.PipelineRunInterface TknTaskRunClient tektonv1beta1.TaskRunInterface KubePodClient kv1.PodInterface FallbackTimeout time.Duration Logger *logrus.Logger // contains filtered or unexported fields }
func (*Store) AddEventTrace ¶
func (s *Store) AddEventTrace(eventTrace *EventTrace)
func (*Store) AddGitopsTrace ¶ added in v0.1.0
func (s *Store) AddGitopsTrace(gitopsTrace GitopsTrace)
func (*Store) AddJxPipelineActivity ¶
func (s *Store) AddJxPipelineActivity(pa *jxv1.PipelineActivity)
func (*Store) AddKubeEvent ¶
func (*Store) AddKubePod ¶
func (*Store) AddLighthouseJob ¶
func (s *Store) AddLighthouseJob(job *lhv1alpha1.LighthouseJob)
func (*Store) AddTknPipelineRun ¶
func (s *Store) AddTknPipelineRun(pr *tknv1beta1.PipelineRun)
func (*Store) AddTknTaskRun ¶
func (s *Store) AddTknTaskRun(tr *tknv1beta1.TaskRun)
func (*Store) CollectGarbage ¶
func (s *Store) CollectGarbage()
func (*Store) DeleteJxPipelineActivity ¶
func (*Store) DeleteKubeEventsFor ¶
func (*Store) DeleteKubePod ¶
func (*Store) DeleteLighthouseJob ¶
func (*Store) DeleteTknPipelineRun ¶
func (*Store) DeleteTknTaskRun ¶
func (*Store) FindEventTraceByEventGUID ¶
func (s *Store) FindEventTraceByEventGUID(eventGUID string) (*EventTrace, error)
func (*Store) FindGitopsTraceAndSpan ¶ added in v0.1.0
func (s *Store) FindGitopsTraceAndSpan(pr PullRequest) (*GitopsTrace, *GitopsSpan, error)
func (*Store) FindLighthouseJob ¶
func (s *Store) FindLighthouseJob(labels map[string]string) *lhv1alpha1.LighthouseJob
func (*Store) GetEventTrace ¶
func (s *Store) GetEventTrace(traceID trace.TraceID) (*EventTrace, error)
func (*Store) GetJxPipelineActivity ¶
func (s *Store) GetJxPipelineActivity(paName string) *jxv1.PipelineActivity
func (*Store) GetTknPipelineRun ¶
func (s *Store) GetTknPipelineRun(prName string) *tknv1beta1.PipelineRun
func (*Store) GetTknTaskRun ¶
func (s *Store) GetTknTaskRun(trName string) *tknv1beta1.TaskRun
func (*Store) IterateOnGitopsTraces ¶ added in v0.1.0
func (s *Store) IterateOnGitopsTraces(callback func(gitopsTrace *GitopsTrace))
type TektonPipelineRunHandler ¶
type TektonPipelineRunHandler struct { BaseResourceEventHandler Tracer trace.Tracer PipelineRunClient tektonv1beta1.PipelineRunInterface }
func (*TektonPipelineRunHandler) OnAdd ¶
func (h *TektonPipelineRunHandler) OnAdd(obj interface{})
func (*TektonPipelineRunHandler) OnDelete ¶
func (h *TektonPipelineRunHandler) OnDelete(obj interface{})
func (*TektonPipelineRunHandler) OnUpdate ¶
func (h *TektonPipelineRunHandler) OnUpdate(oldObj, newObj interface{})
type TektonTaskRunHandler ¶
type TektonTaskRunHandler struct { BaseResourceEventHandler Tracer trace.Tracer TaskRunClient tektonv1beta1.TaskRunInterface }
func (*TektonTaskRunHandler) OnAdd ¶
func (h *TektonTaskRunHandler) OnAdd(obj interface{})
func (*TektonTaskRunHandler) OnDelete ¶
func (h *TektonTaskRunHandler) OnDelete(obj interface{})
func (*TektonTaskRunHandler) OnUpdate ¶
func (h *TektonTaskRunHandler) OnUpdate(oldObj, newObj interface{})
Click to show internal directories.
Click to hide internal directories.