Skip to content

Commit

Permalink
TRANSFER-779: Missed metering agent init
Browse files Browse the repository at this point in the history
  • Loading branch information
laskoviymishka committed Aug 13, 2024
1 parent a295662 commit 4cec91d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions transfer_manager/go/pkg/metering/initializer_os.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ func InitializeWithTags(transfer *server.Transfer, task *server.TransferOperatio
return
}

func WithAgent(agent MeteringAgent) MeteringAgent {
commonAgentMu.Lock()
defer commonAgentMu.Unlock()
commonAgent = agent
return commonAgent
}

func Initialize(transfer *server.Transfer, task *server.TransferOperation) {
InitializeWithTags(transfer, task, map[string]interface{}{})
}

0 comments on commit 4cec91d

Please sign in to comment.