-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbp.go
64 lines (53 loc) · 1.01 KB
/
bp.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
package bp
import (
"bufio"
"bytes"
"io"
"time"
)
type PoolSize interface {
Len() int
Cap() int
}
type ByteGetPut interface {
GetRef() *ByteRef
Get() []byte
Put([]byte) bool
}
type BytesBufferGetPut interface {
GetRef() *BufferRef
Get() *bytes.Buffer
Put(*bytes.Buffer) bool
}
type BufioReaderGetPut interface {
GetRef(io.Reader) *BufioReaderRef
Get(io.Reader) *bufio.Reader
Put(*bufio.Reader) bool
}
type BufioWriterGetPut interface {
GetRef(io.Writer) *BufioWriterRef
Get(io.Writer) *bufio.Writer
Put(*bufio.Writer) bool
}
type ImageRGBAGetPut interface {
GetRef() *ImageRGBARef
Put([]byte) bool
}
type ImageNRGBAGetPut interface {
GetRef() *ImageNRGBARef
Put([]byte) bool
}
type ImageYCbCrGetPut interface {
GetRef() *ImageYCbCrRef
Put([]byte) bool
}
type TickerGetPut interface {
GetRef(time.Duration) *TickerRef
Get(time.Duration) *time.Ticker
Put(*time.Ticker) bool
}
type TimerGetPut interface {
GetRef(time.Duration) *TimerRef
Get(time.Duration) *time.Timer
Put(*time.Timer) bool
}