Documentation
¶
Index ¶
- type Follower
- func (f *Follower) Connect(lo metav1.ListOptions) error
- func (f *Follower) GetLogLock() *sync.Mutex
- func (f *Follower) Log(msg string)
- func (f *Follower) OnEvent(pod *corev1.Pod) error
- func (f *Follower) OnNoPodEventsYet(podList *corev1.PodList)
- func (f *Follower) OnTimeout(msg string)
- func (f *Follower) SetBuildRunName(brName types.NamespacedName)
- func (f *Follower) SetFailPollInterval(t time.Duration)
- func (f *Follower) SetFailPollTimeout(t time.Duration)
- func (f *Follower) Start(listOpts metav1.ListOptions) (*corev1.Pod, error)
- func (f *Follower) Stop()
- func (f *Follower) WaitForCompletion() (*corev1.Pod, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Follower ¶
type Follower struct {
// contains filtered or unexported fields
}
Follower encapsulate the function of tailing the logs for Pods derived from BuildRuns
func NewFollower ¶
func NewFollower( ctx context.Context, buildRun types.NamespacedName, ioStreams *genericclioptions.IOStreams, pw *reactor.PodWatcher, clientset kubernetes.Interface, buildClientset buildclientset.Interface, ) *Follower
NewFollower returns a Follower instance.
func (*Follower) GetLogLock ¶
GetLogLock returns the mutex used for coordinating access to log buffers.
func (*Follower) OnEvent ¶
OnEvent reacts on pod state changes, to start and stop tailing container logs.
func (*Follower) OnNoPodEventsYet ¶
OnNoPodEventsYet reacts to the pod watcher telling us it has not received any pod events for our build run
func (*Follower) OnTimeout ¶
OnTimeout reacts to either the context or request timeout causing the pod watcher to exit
func (*Follower) SetBuildRunName ¶ added in v0.10.0
func (f *Follower) SetBuildRunName(brName types.NamespacedName)
SetBuildRunName allows for setting of the BuildRun name after to call to NewFollower. This help service auto generation of the BuildRun name from the Build. NOTE, if the BuildRun name is not set prior to the call to WaitForCompletion, the Follower will not function fully once events arrive.
func (*Follower) SetFailPollInterval ¶ added in v0.10.0
SetFailPollInterval overrides the default value used in polling calls
func (*Follower) SetFailPollTimeout ¶ added in v0.10.0
SetFailPollTimeout overrides the default value used in polling calls