Skip to content

Commit

Permalink
refactor: var rename
Browse files Browse the repository at this point in the history
  • Loading branch information
varas committed Dec 7, 2020
1 parent 4a74e84 commit f6a89bf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions internal/agent/cmdchannel/runintegration/runintegration.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ func NewHandler(definitionQ chan<- integration.Definition, il integration.Instan
LogDecorated(logger, cmd, args).WithError(err).Warn("cannot create handler for cmd channel run_integration requests")
return
}
trackCtx := ctx2.NewTrackCtx(cmdName, args.Hash(), args.IntegrationName, args.IntegrationArgs)
def.CmdChanReq = &trackCtx

cmdChanReq := ctx2.NewCmdChannelRequest(cmdName, args.Hash(), args.IntegrationName, args.IntegrationArgs)
def.CmdChanReq = &cmdChanReq

definitionQ <- def

Expand Down
2 changes: 1 addition & 1 deletion internal/integrations/v4/integration/definition.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type Definition struct {
ConfigTemplate []byte // external configuration file, if provided
InventorySource ids.PluginID
WhenConditions []when.Condition
CmdChanReq *ctx.CmdChannelRequest // not empty: generated by command-channel "run/stop_integration", contains name+args hash
CmdChanReq *ctx.CmdChannelRequest // not empty: command-channel run/stop integration requests
runnable executor.Executor
newTempFile func(template []byte) (string, error)
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/integrations/track/ctx/ctx.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ type CmdChannelRequest struct {
IntegrationArgs []string
}

// NewTrackCtx create new CmdChannelRequest.
func NewTrackCtx(cmdChanCmdName, cmdChanCmdHash, integrationName string, integrationArgs []string) CmdChannelRequest {
// NewCmdChannelRequest create new CmdChannelRequest.
func NewCmdChannelRequest(cmdChanCmdName, cmdChanCmdHash, integrationName string, integrationArgs []string) CmdChannelRequest {
return CmdChannelRequest{
CmdChannelCmdName: cmdChanCmdName,
CmdChannelCmdHash: cmdChanCmdHash,
Expand Down

0 comments on commit f6a89bf

Please sign in to comment.