Skip to content

Commit

Permalink
[#63]: chore: retract 4.13, remove commander API
Browse files Browse the repository at this point in the history
  • Loading branch information
rustatian authored Jun 26, 2024
2 parents 35b1e26 + 34fae78 commit fff0480
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 16 deletions.
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ module github.com/roadrunner-server/api/v4

go 1.22.4

// Removed cmder API
retract v4.13.0

require (
go.temporal.io/api v1.34.0
go.uber.org/zap v1.27.0
Expand Down
12 changes: 2 additions & 10 deletions plugins/v4/jobs/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,12 @@ type Driver interface {
State(ctx context.Context) (*State, error)
}

// Commander provides the ability to send a command to the Jobs plugin
type Commander interface {
// Command returns the command name
Command() Command
// Pipeline returns the associated command pipeline
Pipeline() string
}

// Constructor constructs Consumer interface. Endure abstraction.
type Constructor interface {
// Name returns the name of the driver
Name() string
// DriverFromConfig constructs a driver (e.g. kafka, amqp) from the configuration using the provided configKey
DriverFromConfig(configKey string, queue Queue, pipeline Pipeline, cmder chan<- Commander) (Driver, error)
DriverFromConfig(configKey string, queue Queue, pipeline Pipeline) (Driver, error)
// DriverFromPipeline constructs a driver (e.g. kafka, amqp) from the pipeline. All configuration is provided by the pipeline
DriverFromPipeline(pipe Pipeline, queue Queue, cmder chan<- Commander) (Driver, error)
DriverFromPipeline(pipe Pipeline, queue Queue) (Driver, error)
}
6 changes: 0 additions & 6 deletions plugins/v4/jobs/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ const (
RRAutoAck string = "rr_auto_ack"
)

type Command string

const (
Stop Command = "stop"
)

// State represents job's state
type State struct {
// Pipeline name
Expand Down

0 comments on commit fff0480

Please sign in to comment.