Skip to content

Commit

Permalink
[#252]: Bump github.com/roadrunner-server/api/v2 from 2.20.0 to 2.20.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rustatian authored Aug 5, 2022
2 parents fc3e781 + 82ecb8e commit 294afbb
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 54 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3 # action page: <https://github.com/actions/setup-go>
with:
go-version: 1.18
go-version: 1.19

- name: Run linter
uses: golangci/[email protected] # Action page: <https://github.com/golangci/golangci-lint-action>
with:
version: v1.47 # without patch version
version: v1.48 # without patch version
only-new-issues: false # show only new issues if it's a pull request
args: --timeout=10m --build-tags=safe
2 changes: 1 addition & 1 deletion aggregatedpool/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ func (wp *Workflow) flushQueue() error {
}

// Run single command and return single result.
func (wp *Workflow) runCommand(cmd interface{}, payloads *commonpb.Payloads, header *commonpb.Header) (*internal.Message, error) {
func (wp *Workflow) runCommand(cmd any, payloads *commonpb.Payloads, header *commonpb.Header) (*internal.Message, error) {
const op = errors.Op("workflow_process_runcommand")
msg := wp.mq.AllocateMessage(cmd, payloads, header)

Expand Down
4 changes: 2 additions & 2 deletions aggregatedpool/queue/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (mq *MessageQueue) Flush() {
// AllocateMessage ..
// TODO(rustatian) allocate??? -> to sync.Pool
// Remove this method if flavor of sync.Pool with internal.Message
func (mq *MessageQueue) AllocateMessage(cmd interface{}, payloads *common.Payloads, header *common.Header) *internal.Message {
func (mq *MessageQueue) AllocateMessage(cmd any, payloads *common.Payloads, header *common.Header) *internal.Message {
msg := &internal.Message{
ID: mq.SeqID(),
Command: cmd,
Expand All @@ -36,7 +36,7 @@ func (mq *MessageQueue) AllocateMessage(cmd interface{}, payloads *common.Payloa
return msg
}

func (mq *MessageQueue) PushCommand(cmd interface{}, payloads *common.Payloads, header *common.Header) {
func (mq *MessageQueue) PushCommand(cmd any, payloads *common.Payloads, header *common.Header) {
mq.queue = append(mq.queue, &internal.Message{
ID: mq.SeqID(),
Command: cmd,
Expand Down
8 changes: 4 additions & 4 deletions data_converter/converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func NewDataConverter(fallback converter.DataConverter) converter.DataConverter
}

// ToPayloads converts a list of values.
func (r *DataConverter) ToPayloads(values ...interface{}) (*commonpb.Payloads, error) {
func (r *DataConverter) ToPayloads(values ...any) (*commonpb.Payloads, error) {
for _, v := range values {
if aggregated, ok := v.(*commonpb.Payloads); ok {
// bypassing
Expand All @@ -29,13 +29,13 @@ func (r *DataConverter) ToPayloads(values ...interface{}) (*commonpb.Payloads, e
}

// ToPayload converts single value to payload.
func (r *DataConverter) ToPayload(value interface{}) (*commonpb.Payload, error) {
func (r *DataConverter) ToPayload(value any) (*commonpb.Payload, error) {
return r.dc.ToPayload(value)
}

// FromPayloads converts to a list of values of different types.
// Useful for deserializing arguments of function invocations.
func (r *DataConverter) FromPayloads(payloads *commonpb.Payloads, valuePtrs ...interface{}) error {
func (r *DataConverter) FromPayloads(payloads *commonpb.Payloads, valuePtrs ...any) error {
if payloads == nil {
return nil
}
Expand All @@ -60,7 +60,7 @@ func (r *DataConverter) FromPayloads(payloads *commonpb.Payloads, valuePtrs ...i
}

// FromPayload converts single value from payload.
func (r *DataConverter) FromPayload(payload *commonpb.Payload, valuePtr interface{}) error {
func (r *DataConverter) FromPayload(payload *commonpb.Payload, valuePtr any) error {
return r.dc.FromPayload(payload, valuePtr)
}

Expand Down
14 changes: 7 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ require (
github.com/goccy/go-json v0.9.10
github.com/golang/protobuf v1.5.2
github.com/google/uuid v1.3.0
github.com/roadrunner-server/api/v2 v2.20.0
github.com/roadrunner-server/errors v1.1.2
github.com/roadrunner-server/api/v2 v2.20.1
github.com/roadrunner-server/errors v1.2.0
github.com/roadrunner-server/sdk/v2 v2.18.2
github.com/stretchr/testify v1.8.0
github.com/uber-go/tally/v4 v4.1.2
Expand Down Expand Up @@ -37,8 +37,8 @@ require (
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
github.com/roadrunner-server/goridge/v3 v3.4.5 // indirect
github.com/roadrunner-server/tcplisten v1.1.2 // indirect
github.com/roadrunner-server/goridge/v3 v3.5.0 // indirect
github.com/roadrunner-server/tcplisten v1.2.0 // indirect
github.com/robfig/cron v1.2.0 // indirect
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
github.com/stretchr/objx v0.4.0 // indirect
Expand All @@ -49,12 +49,12 @@ require (
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/goleak v1.1.12 // indirect
go.uber.org/multierr v1.8.0 // indirect
golang.org/x/net v0.0.0-20220802222814-0bcc04d9c69b // indirect
golang.org/x/net v0.0.0-20220805013720-a33c5aa5df48 // indirect
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
golang.org/x/sys v0.0.0-20220731174439-a90be440212d // indirect
golang.org/x/sys v0.0.0-20220804214406-8e32c043e418 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 // indirect
google.golang.org/genproto v0.0.0-20220802133213-ce4fa296bf78 // indirect
google.golang.org/genproto v0.0.0-20220804142021-4e6b2dfa6612 // indirect
google.golang.org/grpc v1.48.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
40 changes: 14 additions & 26 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/cactus/go-statsd-client/statsd v0.0.0-20200423205355-cb0885a1018c/go.mod h1:l/bIBLeOl9eX+wxJAzxS4TveKRtAqlyDpHjhkfO0MEI=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
Expand Down Expand Up @@ -234,16 +233,16 @@ github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1
github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo=
github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4=
github.com/roadrunner-server/api/v2 v2.20.0 h1:VyWesy/EQGVcTk35KufUgUWSPwGprbC/N92Wb9t9NnM=
github.com/roadrunner-server/api/v2 v2.20.0/go.mod h1:9AvCOEhbNyfPuCCsrpL84TFb0k56BPmYQ6tUBNLS58c=
github.com/roadrunner-server/errors v1.1.2 h1:+LPw9Akgg+8LAGM4wASMWLAoBIbyP+mhNfR+FBS2Slw=
github.com/roadrunner-server/errors v1.1.2/go.mod h1:jVSh32nFtRMzKItYUM9W2CTLLpXAM8HseL2lUENPYtU=
github.com/roadrunner-server/goridge/v3 v3.4.5 h1:g7K9kOmyAOQQ9TusDYksgyKBsKQrQVNc0CT1HKhaphg=
github.com/roadrunner-server/goridge/v3 v3.4.5/go.mod h1:zGbUad2YyaaW9Vt9dqLBDcyrA45KlYoRh8jB7TUsStM=
github.com/roadrunner-server/api/v2 v2.20.1 h1:j6tIrIgxOLxa3ONCqYe4LfS0yIcch4QEzLcLmzcCkBQ=
github.com/roadrunner-server/api/v2 v2.20.1/go.mod h1:IlmguovM8ExuTctvmqitx8+cdfadzHi15fY5Njl55Kk=
github.com/roadrunner-server/errors v1.2.0 h1:qBmNXt8Iex9QnYTjCkbJKsBZu2EtYkQCM06GUDcQBbI=
github.com/roadrunner-server/errors v1.2.0/go.mod h1:z0ECxZp/dDa5RahtMcy4mBIavVxiZ9vwE5kByl7kFtY=
github.com/roadrunner-server/goridge/v3 v3.5.0 h1:z+ruMhKXD5BgGGKkvb3Ob1y9EihDUU4yIB+sLFQ7V9s=
github.com/roadrunner-server/goridge/v3 v3.5.0/go.mod h1:MJjF6RYNgPif7rDu1c9AsGNYVqnA7euKDVYRK5MNTw8=
github.com/roadrunner-server/sdk/v2 v2.18.2 h1:t2Sz3ltV6sPSGfo7P0VdCk+p8pJYg2AnTOJArBHreAg=
github.com/roadrunner-server/sdk/v2 v2.18.2/go.mod h1:3qWZftrmvbOZ8zjeRZIGBfoh1x1rJA8KW5ZtUrmyvdg=
github.com/roadrunner-server/tcplisten v1.1.2 h1:GBjKlSEbA67UB2y83rFWsQKqMQGyalhTN9Q9HCIMBC0=
github.com/roadrunner-server/tcplisten v1.1.2/go.mod h1:wN2/X46Vo60sC9L5Bf/eC8kL+X3//7KIFmANEXZaLsg=
github.com/roadrunner-server/tcplisten v1.2.0 h1:nsiXEEb0zP7vjAsCWNHKpM0HdwFK/KlafFF/2gsTJlg=
github.com/roadrunner-server/tcplisten v1.2.0/go.mod h1:NhumKvt7dbIKVNZnqR1fA4ET1D8ngIKsg0TxnuJTL6A=
github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ=
github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k=
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
Expand Down Expand Up @@ -295,8 +294,6 @@ go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqe
go.temporal.io/api v1.5.0/go.mod h1:BqKxEJJYdxb5dqf0ODfzfMxh8UEQ5L3zKS51FiIYYkA=
go.temporal.io/api v1.8.0 h1:FzAMmBeLs6BEMFyHeJ9M9GAv6McFuH/GjnliBCdQ/Zw=
go.temporal.io/api v1.8.0/go.mod h1:7m1ZOVUFi/54a5IMzMeELnvDy5sJwRfz11zi3Jrww8w=
go.temporal.io/api v1.11.0 h1:RepwYaOZcEII7oKPC0QAUJHiep04NbwGRwMZ6Ofg0es=
go.temporal.io/api v1.11.0/go.mod h1:Z1uAa6iqyq/lu0+41qOG+BNO2JsxXxrgUe8UJv2iNZI=
go.temporal.io/sdk v1.12.0/go.mod h1:lSp3lH1lI0TyOsus0arnO3FYvjVXBZGi/G7DjnAnm6o=
go.temporal.io/sdk v1.15.0 h1:1ZJEBNqLHAN0H64NpD4pydriYF9qhUIaimSVONm3ZKs=
go.temporal.io/sdk v1.15.0/go.mod h1:peqnjALtNpJMKRplWEubefPhDXdAtRTnebsLSFypSts=
Expand Down Expand Up @@ -393,11 +390,8 @@ golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qx
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220531201128-c960675eff93/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.0.0-20220728181054-f92ba40d432d/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
golang.org/x/net v0.0.0-20220728211354-c7608f3a8462 h1:UreQrH7DbFXSi9ZFox6FNT3WBooWmdANpU+IfkT1T4I=
golang.org/x/net v0.0.0-20220728211354-c7608f3a8462/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
golang.org/x/net v0.0.0-20220802222814-0bcc04d9c69b h1:3ogNYyK4oIQdIKzTu68hQrr4iuVxF3AxKl9Aj/eDrw0=
golang.org/x/net v0.0.0-20220802222814-0bcc04d9c69b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
golang.org/x/net v0.0.0-20220805013720-a33c5aa5df48 h1:N9Vc/rorQUDes6B9CNdIxAn5jODGj2wzfrei2x4wNj4=
golang.org/x/net v0.0.0-20220805013720-a33c5aa5df48/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
Expand Down Expand Up @@ -466,11 +460,8 @@ golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220730100132-1609e554cd39 h1:aNCnH+Fiqs7ZDTFH6oEFjIfbX2HvgQXJ6uQuUbTobjk=
golang.org/x/sys v0.0.0-20220730100132-1609e554cd39/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220731174439-a90be440212d h1:Sv5ogFZatcgIMMtBSTTAgMYsicp25MXBubjXNDKwm80=
golang.org/x/sys v0.0.0-20220731174439-a90be440212d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220804214406-8e32c043e418 h1:9vYwv7OjYaky/tlAeD7C4oC9EsPTlaFl1H2jS++V+ME=
golang.org/x/sys v0.0.0-20220804214406-8e32c043e418/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
Expand Down Expand Up @@ -593,11 +584,8 @@ google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6D
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To=
google.golang.org/genproto v0.0.0-20220725144611-272f38e5d71b/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc=
google.golang.org/genproto v0.0.0-20220728213248-dd149ef739b9 h1:d3fKQZK+1rWQMg3xLKQbPMirUCo29I/NRdI2WarSzTg=
google.golang.org/genproto v0.0.0-20220728213248-dd149ef739b9/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc=
google.golang.org/genproto v0.0.0-20220802133213-ce4fa296bf78 h1:QntLWYqZeuBtJkth3m/6DLznnI0AHJr+AgJXvVh/izw=
google.golang.org/genproto v0.0.0-20220802133213-ce4fa296bf78/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc=
google.golang.org/genproto v0.0.0-20220804142021-4e6b2dfa6612 h1:NX3L5YesD5qgxxrPHdKqHH38Ao0AG6poRXG+JljPsGU=
google.golang.org/genproto v0.0.0-20220804142021-4e6b2dfa6612/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc=
google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
Expand Down
2 changes: 1 addition & 1 deletion internal/codec/proto/proto.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func NewCodec(log *zap.Logger, dc converter.DataConverter) *Codec {
log: log,
dc: dc,
frPool: sync.Pool{
New: func() interface{} {
New: func() any {
return &protocolV1.Frame{}
},
},
Expand Down
10 changes: 5 additions & 5 deletions internal/logger/wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ func NewZapAdapter(zapLogger *zap.Logger) *ZapAdapter {
}
}

func (log *ZapAdapter) Debug(msg string, keyvals ...interface{}) {
func (log *ZapAdapter) Debug(msg string, keyvals ...any) {
log.zl.Debug(msg, log.fields(keyvals)...)
}

func (log *ZapAdapter) Info(msg string, keyvals ...interface{}) {
func (log *ZapAdapter) Info(msg string, keyvals ...any) {
log.zl.Info(msg, log.fields(keyvals)...)
}

func (log *ZapAdapter) Warn(msg string, keyvals ...interface{}) {
func (log *ZapAdapter) Warn(msg string, keyvals ...any) {
log.zl.Warn(msg, log.fields(keyvals)...)
}

func (log *ZapAdapter) Error(msg string, keyvals ...interface{}) {
func (log *ZapAdapter) Error(msg string, keyvals ...any) {
log.zl.Error(msg, log.fields(keyvals)...)
}

func (log *ZapAdapter) fields(keyvals []interface{}) []zap.Field {
func (log *ZapAdapter) fields(keyvals []any) []zap.Field {
// we should have even number of keys and values
if len(keyvals)%2 != 0 {
return []zap.Field{zap.Error(fmt.Errorf("odd number of keyvals pairs: %v", keyvals))}
Expand Down
10 changes: 5 additions & 5 deletions internal/protocol.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ type Message struct {
ID uint64 `json:"id"`

// Command of the message in unmarshalled form. Pointer.
Command interface{} `json:"command,omitempty"`
Command any `json:"command,omitempty"`

// Failure associated with command id.
Failure *failure.Failure `json:"failure,omitempty"`
Expand Down Expand Up @@ -274,7 +274,7 @@ func (cmd ExecuteActivity) ActivityParams(env bindings.WorkflowEnvironment, payl
}

// LocalActivityParams maps activity command to activity params.
func (cmd ExecuteLocalActivity) LocalActivityParams(env bindings.WorkflowEnvironment, fn interface{}, payloads *commonpb.Payloads) bindings.ExecuteLocalActivityParams {
func (cmd ExecuteLocalActivity) LocalActivityParams(env bindings.WorkflowEnvironment, fn any, payloads *commonpb.Payloads) bindings.ExecuteLocalActivityParams {
if cmd.Options.StartToCloseTimeout == 0 {
cmd.Options.StartToCloseTimeout = time.Minute
}
Expand Down Expand Up @@ -303,7 +303,7 @@ func (cmd ExecuteLocalActivity) LocalActivityParams(env bindings.WorkflowEnviron
ExecuteLocalActivityOptions: truTemOptions,
ActivityFn: fn,
ActivityType: cmd.Name,
InputArgs: []interface{}{payloads},
InputArgs: []any{payloads},
WorkflowInfo: env.WorkflowInfo(),
ScheduledTime: time.Now(),
Header: nil,
Expand Down Expand Up @@ -340,7 +340,7 @@ func (cmd NewTimer) ToDuration() time.Duration {
}

// CommandName returns command name (only for the commands sent to the worker)
func CommandName(cmd interface{}) (string, error) {
func CommandName(cmd any) (string, error) {
const op = errors.Op("command_name")
switch cmd.(type) {
case GetWorkerInfo, *GetWorkerInfo:
Expand Down Expand Up @@ -393,7 +393,7 @@ func CommandName(cmd interface{}) (string, error) {
}

// InitCommand reads command from binary payload
func InitCommand(name string) (interface{}, error) {
func InitCommand(name string) (any, error) {
const op = errors.Op("init_command")
switch name {
case getWorkerInfoCommand:
Expand Down
2 changes: 1 addition & 1 deletion plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ func (p *Plugin) Name() string {
return PluginName
}

func (p *Plugin) RPC() interface{} {
func (p *Plugin) RPC() any {
return &rpc{srv: p, client: p.client}
}

Expand Down

0 comments on commit 294afbb

Please sign in to comment.