Debian Codegraph @

app/stats/counter.go

raw symbols SCIP
1 // +build !confonly
2
3 package statsscip-go gomod v2ray.com/core . `v2ray.com/core/app/stats`/
4
5 import "sync/atomicscip-go gomod github.com/golang/go/src go1.15 `sync/atomic`/"
6
7 // Counter is an implementation of stats.Counter.
8 type Counterscip-go gomod v2ray.com/core . `v2ray.com/core/app/stats`/Counter# struct {
9 valuescip-go gomod v2ray.com/core . `v2ray.com/core/app/stats`/Counter#value. int64
10 }
11
12 // Value implements stats.Counter.
13 func (c *Counterscip-go gomod v2ray.com/core . `v2ray.com/core/app/stats`/Counter#) Valuescip-go gomod v2ray.com/core . `v2ray.com/core/app/stats`/Counter#Value().() int64 {
14 return atomicscip-go gomod github.com/golang/go/src go1.15 `sync/atomic`/.LoadInt64scip-go gomod github.com/golang/go/src go1.15 `sync/atomic`/LoadInt64().(&c.valuescip-go gomod v2ray.com/core . `v2ray.com/core/app/stats`/Counter#value.)
15 }
16
17 // Set implements stats.Counter.
18 func (c *Counterscip-go gomod v2ray.com/core . `v2ray.com/core/app/stats`/Counter#) Setscip-go gomod v2ray.com/core . `v2ray.com/core/app/stats`/Counter#Set().(newValue int64) int64 {
19 return atomicscip-go gomod github.com/golang/go/src go1.15 `sync/atomic`/.SwapInt64scip-go gomod github.com/golang/go/src go1.15 `sync/atomic`/SwapInt64().(&c.valuescip-go gomod v2ray.com/core . `v2ray.com/core/app/stats`/Counter#value., newValue)
20 }
21
22 // Add implements stats.Counter.
23 func (c *Counterscip-go gomod v2ray.com/core . `v2ray.com/core/app/stats`/Counter#) Addscip-go gomod v2ray.com/core . `v2ray.com/core/app/stats`/Counter#Add().(delta int64) int64 {
24 return atomicscip-go gomod github.com/golang/go/src go1.15 `sync/atomic`/.AddInt64scip-go gomod github.com/golang/go/src go1.15 `sync/atomic`/AddInt64().(&c.valuescip-go gomod v2ray.com/core . `v2ray.com/core/app/stats`/Counter#value., delta)
25 }