Documentation ¶
Overview ¶
Package triggers is a generated GoMock package.
Index ¶
- Constants
- func NewClusterEventEvent(eventType testtrigger.EventType, event *corev1.Event) *watcherEvent
- type Execution
- type ExecutorF
- type Lease
- type LeaseBackend
- type MockLeaseBackend
- type MockLeaseBackendMockRecorder
- type MongoLease
- type MongoLeaseBackend
- type Option
- func WithClusterID(id string) Option
- func WithExecutor(executor ExecutorF) Option
- func WithHostnameIdentifier() Option
- func WithIdentifier(id string) Option
- func WithLeaseCheckerInterval(interval time.Duration) Option
- func WithScraperInterval(interval time.Duration) Option
- func WithWatchFromDate(from time.Time) Option
- type Service
Constants ¶
View Source
const ( ExecutionTest = "test" ExecutionTestSuite = "testsuite" )
Variables ¶
This section is empty.
Functions ¶
func NewClusterEventEvent ¶
func NewClusterEventEvent(eventType testtrigger.EventType, event *corev1.Event) *watcherEvent
Types ¶
type ExecutorF ¶
type ExecutorF func(context.Context, *testtriggersv1.TestTrigger) error
type Lease ¶ added in v1.6.11
type LeaseBackend ¶ added in v1.6.11
type LeaseBackend interface { // TryAcquire tries to acquire lease from underlying datastore TryAcquire(ctx context.Context, id, clusterID string) (leased bool, err error) }
LeaseBackend does a check and set operation on the Lease object in the defined data source
type MockLeaseBackend ¶ added in v1.6.11
type MockLeaseBackend struct {
// contains filtered or unexported fields
}
MockLeaseBackend is a mock of LeaseBackend interface.
func NewMockLeaseBackend ¶ added in v1.6.11
func NewMockLeaseBackend(ctrl *gomock.Controller) *MockLeaseBackend
NewMockLeaseBackend creates a new mock instance.
func (*MockLeaseBackend) EXPECT ¶ added in v1.6.11
func (m *MockLeaseBackend) EXPECT() *MockLeaseBackendMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockLeaseBackend) TryAcquire ¶ added in v1.6.11
TryAcquire mocks base method.
type MockLeaseBackendMockRecorder ¶ added in v1.6.11
type MockLeaseBackendMockRecorder struct {
// contains filtered or unexported fields
}
MockLeaseBackendMockRecorder is the mock recorder for MockLeaseBackend.
func (*MockLeaseBackendMockRecorder) TryAcquire ¶ added in v1.6.11
func (mr *MockLeaseBackendMockRecorder) TryAcquire(arg0, arg1, arg2 interface{}) *gomock.Call
TryAcquire indicates an expected call of TryAcquire.
type MongoLease ¶ added in v1.6.11
type MongoLease struct { Lease // contains filtered or unexported fields }
type MongoLeaseBackend ¶ added in v1.6.11
type MongoLeaseBackend struct {
// contains filtered or unexported fields
}
func NewMongoLeaseBackend ¶ added in v1.6.11
func NewMongoLeaseBackend(db *mongo.Database) *MongoLeaseBackend
func (*MongoLeaseBackend) TryAcquire ¶ added in v1.6.11
type Option ¶
type Option func(*Service)
func WithClusterID ¶ added in v1.6.11
func WithExecutor ¶ added in v1.6.11
func WithHostnameIdentifier ¶ added in v1.6.11
func WithHostnameIdentifier() Option
func WithIdentifier ¶ added in v1.6.11
func WithLeaseCheckerInterval ¶ added in v1.6.11
func WithScraperInterval ¶ added in v1.6.11
func WithWatchFromDate ¶ added in v1.6.11
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService( scheduler *scheduler.Scheduler, clientset kubernetes.Interface, testKubeClientset testkubeclientsetv1.Interface, testSuitesClient testsuitesclientv2.Interface, testsClient testsclientv3.Interface, resultRepository result.Repository, testResultRepository testresult.Repository, leaseBackend LeaseBackend, logger *zap.SugaredLogger, configMap config.Repository, opts ...Option, ) *Service
Click to show internal directories.
Click to hide internal directories.