triggers

package
v1.10.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2023 License: MIT Imports: 50 Imported by: 0

Documentation

Overview

Package triggers is a generated GoMock package.

Index

Constants

View Source
const (
	ExecutionTest      = "test"
	ExecutionTestSuite = "testsuite"
)

Variables

View Source
var ErrConditionTimeout = errors.New("timed-out waiting for trigger conditions")

Functions

This section is empty.

Types

type AcquireAlwaysLeaseBackend added in v1.9.18

type AcquireAlwaysLeaseBackend struct{}

func NewAcquireAlwaysLeaseBackend added in v1.9.18

func NewAcquireAlwaysLeaseBackend() *AcquireAlwaysLeaseBackend

func (*AcquireAlwaysLeaseBackend) TryAcquire added in v1.9.18

func (b *AcquireAlwaysLeaseBackend) TryAcquire(ctx context.Context, id, clusterID string) (leased bool, err error)

type Execution

type Execution string

type Lease added in v1.6.11

type Lease struct {
	Identifier string    `bson:"identifier"`
	ClusterID  string    `bson:"cluster_id"`
	AcquiredAt time.Time `bson:"acquired_at"`
	RenewedAt  time.Time `bson:"renewed_at"`
}

func NewLease added in v1.6.11

func NewLease(identifier, clusterID string) *Lease

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

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockLeaseBackend) TryAcquire added in v1.6.11

func (m *MockLeaseBackend) TryAcquire(arg0 context.Context, arg1, arg2 string) (bool, error)

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

func (b *MongoLeaseBackend) TryAcquire(ctx context.Context, id, clusterID string) (leased bool, err error)

type Option

type Option func(*Service)

func WithClusterID added in v1.6.11

func WithClusterID(id string) Option

func WithExecutor added in v1.6.11

func WithExecutor(executor ExecutorF) Option

func WithHostnameIdentifier added in v1.6.11

func WithHostnameIdentifier() Option

func WithIdentifier added in v1.6.11

func WithIdentifier(id string) Option

func WithLeaseCheckerInterval added in v1.6.11

func WithLeaseCheckerInterval(interval time.Duration) Option

func WithScraperInterval added in v1.6.11

func WithScraperInterval(interval time.Duration) Option

func WithWatchFromDate added in v1.6.11

func WithWatchFromDate(from time.Time) Option

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

func (*Service) Run

func (s *Service) Run(ctx context.Context)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL