@@ -55,7 +55,7 @@ var _ = Describe("runnables", func() {
5555 })
5656
5757 It ("should add WarmupRunnable to the Warmup and LeaderElection group" , func () {
58- warmupRunnable := WarmupRunnableFunc {
58+ warmupRunnable := warmupRunnableFunc {
5959 RunFunc : func (c context.Context ) error {
6060 <- c .Done ()
6161 return nil
@@ -72,7 +72,7 @@ var _ = Describe("runnables", func() {
7272 })
7373
7474 It ("should add WarmupRunnable that doesn't needs leader election to warmup group only" , func () {
75- warmupRunnable := CombinedRunnable {
75+ warmupRunnable := combinedRunnable {
7676 RunFunc : func (c context.Context ) error {
7777 <- c .Done ()
7878 return nil
@@ -93,7 +93,7 @@ var _ = Describe("runnables", func() {
9393 })
9494
9595 It ("should add WarmupRunnable that needs leader election to Warmup and LeaderElection group, not Others" , func () {
96- warmupRunnable := CombinedRunnable {
96+ warmupRunnable := combinedRunnable {
9797 RunFunc : func (c context.Context ) error {
9898 <- c .Done ()
9999 return nil
@@ -117,7 +117,7 @@ var _ = Describe("runnables", func() {
117117 It ("should execute the Warmup function when Warmup group is started" , func () {
118118 var warmupExecuted atomic.Bool
119119
120- warmupRunnable := WarmupRunnableFunc {
120+ warmupRunnable := warmupRunnableFunc {
121121 RunFunc : func (c context.Context ) error {
122122 <- c .Done ()
123123 return nil
@@ -144,7 +144,7 @@ var _ = Describe("runnables", func() {
144144 It ("should propagate errors from Warmup function to error channel" , func () {
145145 expectedErr := fmt .Errorf ("expected warmup error" )
146146
147- warmupRunnable := WarmupRunnableFunc {
147+ warmupRunnable := warmupRunnableFunc {
148148 RunFunc : func (c context.Context ) error {
149149 <- c .Done ()
150150 return nil
@@ -349,51 +349,51 @@ var _ = Describe("runnableGroup", func() {
349349 })
350350})
351351
352- // LeaderElectionRunnableFunc is a helper struct that implements LeaderElectionRunnable
352+ // leaderElectionRunnableFunc is a helper struct that implements LeaderElectionRunnable
353353// for testing purposes.
354- type LeaderElectionRunnableFunc struct {
354+ type leaderElectionRunnableFunc struct {
355355 RunFunc func (context.Context ) error
356356 NeedLeaderElectionFunc func () bool
357357}
358358
359- func (r LeaderElectionRunnableFunc ) Start (ctx context.Context ) error {
359+ func (r leaderElectionRunnableFunc ) Start (ctx context.Context ) error {
360360 return r .RunFunc (ctx )
361361}
362362
363- func (r LeaderElectionRunnableFunc ) NeedLeaderElection () bool {
363+ func (r leaderElectionRunnableFunc ) NeedLeaderElection () bool {
364364 return r .NeedLeaderElectionFunc ()
365365}
366366
367- // WarmupRunnableFunc is a helper struct that implements WarmupRunnable
367+ // warmupRunnableFunc is a helper struct that implements WarmupRunnable
368368// for testing purposes.
369- type WarmupRunnableFunc struct {
369+ type warmupRunnableFunc struct {
370370 RunFunc func (context.Context ) error
371371 WarmupFunc func (context.Context ) error
372372}
373373
374- func (r WarmupRunnableFunc ) Start (ctx context.Context ) error {
374+ func (r warmupRunnableFunc ) Start (ctx context.Context ) error {
375375 return r .RunFunc (ctx )
376376}
377377
378- func (r WarmupRunnableFunc ) Warmup (ctx context.Context ) error {
378+ func (r warmupRunnableFunc ) Warmup (ctx context.Context ) error {
379379 return r .WarmupFunc (ctx )
380380}
381381
382- // CombinedRunnable implements both WarmupRunnable and LeaderElectionRunnable
383- type CombinedRunnable struct {
382+ // combinedRunnable implements both WarmupRunnable and LeaderElectionRunnable
383+ type combinedRunnable struct {
384384 RunFunc func (context.Context ) error
385385 WarmupFunc func (context.Context ) error
386386 NeedLeaderElectionFunc func () bool
387387}
388388
389- func (r CombinedRunnable ) Start (ctx context.Context ) error {
389+ func (r combinedRunnable ) Start (ctx context.Context ) error {
390390 return r .RunFunc (ctx )
391391}
392392
393- func (r CombinedRunnable ) Warmup (ctx context.Context ) error {
393+ func (r combinedRunnable ) Warmup (ctx context.Context ) error {
394394 return r .WarmupFunc (ctx )
395395}
396396
397- func (r CombinedRunnable ) NeedLeaderElection () bool {
397+ func (r combinedRunnable ) NeedLeaderElection () bool {
398398 return r .NeedLeaderElectionFunc ()
399399}
0 commit comments