MCPcopy
hub / github.com/crowdsecurity/crowdsec / Client

Method Client

pkg/database/ent/tx.go:159–165  ·  view source on GitHub ↗

Client returns a Client that binds to current transaction.

()

Source from the content-addressed store, hash-verified

157
158// Client returns a Client that binds to current transaction.
159func (tx *Tx) Client() *Client {
160 tx.clientOnce.Do(func() {
161 tx.client = &Client{config: tx.config}
162 tx.client.init()
163 })
164 return tx.client
165}
166
167func (tx *Tx) init() {
168 tx.Alert = NewAlertClient(tx.config)

Callers 2

createAlertBatchMethod · 0.45

Calls 2

DoMethod · 0.80
initMethod · 0.45

Tested by

no test coverage detected