| 1 |
package binary |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
import "errors" |
| 7 |
|
| 8 |
var ( |
| 9 |
ErrWriteAfterClose = errors.New("format/binary: write after close") |
| 10 |
ErrWriteBucketAfterClose = errors.New("format/binary: write to closed bucket") |
| 11 |
) |
| 12 |
|
| 13 |
var ( |
| 14 |
Magic = [...]byte{0x49, 0x46, 0x4c, 0x58, 0x44, 0x55, 0x4d, 0x50} |
| 15 |
) |
| 16 |
|
| 17 |
type MessageType byte |
| 18 |
|
| 19 |
const ( |
| 20 |
HeaderType MessageType = iota + 1 |
| 21 |
BucketHeaderType |
| 22 |
BucketFooterType |
| 23 |
SeriesHeaderType |
| 24 |
FloatPointsType |
| 25 |
IntegerPointsType |
| 26 |
UnsignedPointsType |
| 27 |
BooleanPointsType |
| 28 |
StringPointsType |
| 29 |
SeriesFooterType |
| 30 |
) |
| 31 |
|
| 32 |
type message interface { |
| 33 |
Size() int |
| 34 |
MarshalTo(dAtA []byte) (int, error) |
| 35 |
} |
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
────────────────────┬─────────────────┐ |
| 42 |
│ |
| 43 |
n │ |
| 44 |
│ |
| 45 |
────────────────────┴─────────────────┘ |
| 46 |
|
| 47 |
|
| 48 |
────────────────────┬─────────────────┐ |
| 49 |
│ |
| 50 |
ter │ |
| 51 |
│ |
| 52 |
────────────────────┴─────────────────┘ |
| 53 |
|
| 54 |
|
| 55 |
────────────────────┬─────────────────┐ |
| 56 |
│ |
| 57 |
ter │ |
| 58 |
│ |
| 59 |
────────────────────┴─────────────────┘ |
| 60 |
|