Documentation ¶
Index ¶
- func NewPublisher(cf codefresh.PipelineService) model.EventPublisher
- func NewRunner(ps codefresh.PipelineService) model.Runner
- func NewSecretChecker() model.SecretChecker
- type PipelineRunner
- type Publisher
- type RedisEventGetter
- type RedisPool
- type RedisPoolService
- type RedisStore
- func (r *RedisStore) CreateEvent(ctx context.Context, eventType, kind, secret, context string, ...) (*model.Event, error)
- func (r *RedisStore) CreateTrigger(ctx context.Context, event, pipeline string, filters map[string]string) error
- func (r *RedisStore) DeleteAllTriggersByPipeline(ctx context.Context, pipeline string) error
- func (r *RedisStore) DeleteEvent(ctx context.Context, event, context string) error
- func (r *RedisStore) DeleteTrigger(ctx context.Context, event, pipeline string) error
- func (r *RedisStore) GetEvent(ctx context.Context, event string) (*model.Event, error)
- func (r *RedisStore) GetEventTriggers(ctx context.Context, event string) ([]model.Trigger, error)
- func (r *RedisStore) GetEvents(ctx context.Context, eventType, kind, filter string) ([]model.Event, error)
- func (r *RedisStore) GetPipelineTriggers(ctx context.Context, pipeline string, withEvent bool) ([]model.Trigger, error)
- func (r *RedisStore) GetTriggerPipelines(ctx context.Context, event string, vars map[string]string) ([]string, error)
- func (r *RedisStore) Ping() (string, error)
- type SecretChecker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPublisher ¶
func NewPublisher(cf codefresh.PipelineService) model.EventPublisher
NewPublisher initialize new Publisher
func NewRunner ¶
func NewRunner(ps codefresh.PipelineService) model.Runner
NewRunner initialize new PipelineRunner
func NewSecretChecker ¶
func NewSecretChecker() model.SecretChecker
NewSecretChecker initialize new SecretChecker
Types ¶
type PipelineRunner ¶
type PipelineRunner struct {
// contains filtered or unexported fields
}
PipelineRunner runs Codefresh pipelines
func (*PipelineRunner) Run ¶
func (r *PipelineRunner) Run(account string, pipelines []string, vars map[string]string, event model.NormalizedEvent) ([]model.PipelineRun, error)
Run Codefresh pipelines: return arrays of runs and errors
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
Publisher publish event to Codefresh eventbus
type RedisEventGetter ¶
type RedisEventGetter struct {
// contains filtered or unexported fields
}
RedisEventGetter implements GetEvent used internally in RedisStore
type RedisPool ¶
type RedisPool struct {
// contains filtered or unexported fields
}
RedisPool redis pool
type RedisPoolService ¶
RedisPoolService interface for getting Redis connection from pool or test mock
type RedisStore ¶
type RedisStore struct {
// contains filtered or unexported fields
}
RedisStore in memory trigger map store
func NewRedisStore ¶
func NewRedisStore(server string, port int, db int, password string, pipelineSvc codefresh.PipelineService, eventProvider provider.EventProvider) *RedisStore
NewRedisStore create new Redis DB for storing trigger map
func (*RedisStore) CreateEvent ¶
func (r *RedisStore) CreateEvent(ctx context.Context, eventType, kind, secret, context string, values map[string]string) (*model.Event, error)
CreateEvent new trigger event
func (*RedisStore) CreateTrigger ¶
func (r *RedisStore) CreateTrigger(ctx context.Context, event, pipeline string, filters map[string]string) error
CreateTrigger create trigger: link event <-> multiple pipelines
func (*RedisStore) DeleteAllTriggersByPipeline ¶
func (r *RedisStore) DeleteAllTriggersByPipeline(ctx context.Context, pipeline string) error
func (*RedisStore) DeleteEvent ¶
func (r *RedisStore) DeleteEvent(ctx context.Context, event, context string) error
DeleteEvent delete trigger event
func (*RedisStore) DeleteTrigger ¶
func (r *RedisStore) DeleteTrigger(ctx context.Context, event, pipeline string) error
DeleteTrigger delete trigger: unlink event from pipeline
func (*RedisStore) GetEventTriggers ¶
GetEventTriggers get list of triggers for specified event
func (*RedisStore) GetEvents ¶
func (r *RedisStore) GetEvents(ctx context.Context, eventType, kind, filter string) ([]model.Event, error)
GetEvents get events by event type, kind and filter (can be URI or part of URI)
func (*RedisStore) GetPipelineTriggers ¶
func (r *RedisStore) GetPipelineTriggers(ctx context.Context, pipeline string, withEvent bool) ([]model.Trigger, error)
GetPipelineTriggers get list of defined triggers for specified pipeline
func (*RedisStore) GetTriggerPipelines ¶
func (r *RedisStore) GetTriggerPipelines(ctx context.Context, event string, vars map[string]string) ([]string, error)
GetTriggerPipelines get pipelines that have trigger defined with filter applied can be filtered by event-uri(s)