Documentation ¶
Index ¶
- func BenchBasicMemInfo() []benchutil.Bench
- func BenchCPUInfo(n int) []benchutil.Bench
- func BenchMemInfo() []benchutil.Bench
- func BenchMessage(l int) []benchutil.Bench
- func BenchRedditAccount() []benchutil.Bench
- type AccountData
- type BasicMemInfo
- func (z *BasicMemInfo) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *BasicMemInfo) EncodeMsg(en *msgp.Writer) (err error)
- func (z *BasicMemInfo) MarshalMsg(b []byte) (o []byte, err error)
- func (z *BasicMemInfo) Msgsize() (s int)
- func (z *BasicMemInfo) UnmarshalMsg(bts []byte) (o []byte, err error)
- type CPU
- type CPUInfo
- type MemInfo
- type Message
- type RedditAccount
- func (z *RedditAccount) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *RedditAccount) EncodeMsg(en *msgp.Writer) (err error)
- func (z *RedditAccount) MarshalMsg(b []byte) (o []byte, err error)
- func (z *RedditAccount) Msgsize() (s int)
- func (z *RedditAccount) UnmarshalMsg(bts []byte) (o []byte, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BenchBasicMemInfo ¶
BenchBasicMemInfo runs the BasicMemInfo benches for Marshal/Unmarshal.
func BenchCPUInfo ¶
BenchCPUInfo runs the CPUInfo benches for Marshal/Unmarshal.
func BenchMemInfo ¶
BenchMemInfo runs the MemInfo benches for Marshal/Unmarshal.
func BenchMessage ¶
BenchMessage runs the Message benches for Marshal/Unmarshal.
func BenchRedditAccount ¶
BenchRedditAccount runs the RedditAccount benches for Marshal/Unmarshal.
Types ¶
type AccountData ¶
type AccountData struct { CommentKarma int64 `msg:"comment_karma"` HasMail bool `msg:"has_mail"` HasModMail bool `msg:"has_mod_mail"` ID string `msg:"id"` InboxCount int64 `msg:"inbox_count"` IsFriend bool `msg:"is_friend"` IsGold bool `msg:"is_gold"` LinkKarma int64 `msg:"link_karma"` ModHash string `msg:"mod_hash"` Name string `msg:"name"` Over18 bool `msg:"over_18"` }
func (*AccountData) DecodeMsg ¶
func (z *AccountData) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*AccountData) EncodeMsg ¶
func (z *AccountData) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*AccountData) MarshalMsg ¶
func (z *AccountData) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*AccountData) Msgsize ¶
func (z *AccountData) Msgsize() (s int)
func (*AccountData) UnmarshalMsg ¶
func (z *AccountData) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type BasicMemInfo ¶
type BasicMemInfo struct { MemTotal int64 `msg:"mem_total"` MemFree int64 `msg:"mem_free"` MemAvailable int64 `msg:"mem_available"` Buffers int64 `msg:"buffers"` Cached int64 `msg:"cached"` SwapCached int64 `msg:"swap_cached"` SwapTotal int64 `msg:"swap_total"` SwapFree int64 `msg:"swap_free"` }
func PrepareBasicMemInfoData ¶
func PrepareBasicMemInfoData(data []shared.ShBasicMemInfo) []BasicMemInfo
PrepareBasicMemInfoData generates the protobuf version of the data.
func (*BasicMemInfo) DecodeMsg ¶
func (z *BasicMemInfo) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*BasicMemInfo) EncodeMsg ¶
func (z *BasicMemInfo) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*BasicMemInfo) MarshalMsg ¶
func (z *BasicMemInfo) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*BasicMemInfo) Msgsize ¶
func (z *BasicMemInfo) Msgsize() (s int)
func (*BasicMemInfo) UnmarshalMsg ¶
func (z *BasicMemInfo) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type CPU ¶
type CPU struct { Processor int16 `msg:"processor"` VendorID string `msg:"vendor_id"` CPUFamily string `msg:"cpu_family"` Model string `msg:"model"` ModelName string `msg:"model_name"` Stepping string `msg:"stepping"` Microcode string `msg:"microcode"` CPUMHz float32 `msg:"cpu_mhz"` CacheSize string `msg:"cache_size"` PhysicalID int16 `msg:"physical_id"` Siblings int16 `msg:"siblings"` CoreID int16 `msg:"core_id"` CPUCores int16 `msg:"cpu_cores"` ApicID int16 `msg:"apicid"` InitialApicID int16 `msg:"initial_apicid"` FPU string `msg:"fpu"` FPUException string `msg:"fpu_exception"` CPUIDLevel string `msg:"cpuid_level"` WP string `msg:"wp"` Flags string `msg:"flags"` BogoMIPS float32 `msg:"bogomips"` CLFlushSize string `msg:"clflush_size"` CacheAlignment string `msg:"cache_alignment"` AddressSizes string `msg:"address_sizes"` PowerManagement string `msg:"power_management"` }
func (*CPU) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
type CPUInfo ¶
type CPUInfo struct {
CPUs []CPU `msg:cpus`
}
func PrepareCPUInfoData ¶
PrepareCPUInfoData generates the protobuf version of the data.
func (*CPUInfo) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
type MemInfo ¶
type MemInfo struct { MemTotal int64 `msg:"mem_total"` MemFree int64 `msg:"mem_free"` MemAvailable int64 `msg:"mem_available"` Buffers int64 `msg:"buffers"` Cached int64 `msg:"cached"` SwapCached int64 `msg:"swap_cached"` Active int64 `msg:"active"` Inactive int64 `msg:"inactive"` ActiveAnon int64 `msg:"active_anon"` InactiveAnon int64 `msg:"inactive_anon"` ActiveFile int64 `msg:"active_file"` InactiveFile int64 `msg:"inactive_file"` Unevictable int64 `msg:"unevictable"` Mlocked int64 `msg:"mlocked"` SwapTotal int64 `msg:"swap_total"` SwapFree int64 `msg:"swap_free"` Dirty int64 `msg:"dirty"` Writeback int64 `msg:"writeback"` AnonPages int64 `msg:"anon_pages"` Mapped int64 `msg:"mapped"` Shmem int64 `msg:"sh_mem"` Slab int64 `msg:"slab"` SReclaimable int64 `msg:"s_reclaimable"` SUnreclaim int64 `msg:"s_unreclaim"` KernelStack int64 `msg:"kernel_stack"` NFSUnstable int64 `msg:"nfs_unstable"` Bounce int64 `msg:"bounce"` WritebackTmp int64 `msg:"writeback_tmp"` CommitLimit int64 `msg:"commit_limit"` VmallocTotal int64 `msg:"vmalloc_total"` VmallocUsed int64 `msg:"vmalloc_used"` VmallocChunk int64 `msg:"vmalloc_chunked"` HardwareCorrupted int64 `msg:"hardware_corrupted"` AnonHugePages int64 `msg:"anon_huge_pages"` HugePagesTotal int64 `msg:"huge_pages_total"` HugePagesFree int64 `msg:"huge_pages_free"` HugePagesRsvd int64 `msg:"huge_pages_rsvd"` Hugepagesize int64 `msg:"huge_pages_size"` DirectMap4k int64 `msg:"direct_map_4k"` DirectMap2M int64 `msg:"direct_map_2m"` }
func PrepareMemInfoData ¶
PrepareMemInfoData generates the protobuf version of the data.
func (*MemInfo) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
type Message ¶
type Message struct { ID []byte `msg:"id"` DestID uint32 `msg:"dest_id"` Type int8 `msg:"type"` Kind int16 `msg:"kind"` Data []byte `msg:"data"` }
func PrepareMessageData ¶
PrepareMessageData generates the protobuf version of the data.
func (*Message) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
type RedditAccount ¶
type RedditAccount struct { ID string `msg:"id"` Name string `msg:"name"` Kind string `msg:"kind"` Data AccountData `msg:"data"` }
func PrepareRedditAccountData ¶
func PrepareRedditAccountData(data []shared.ShRedditAccount) []RedditAccount
PrepareRedditAccountData generates the protobuf version of the data.
func (*RedditAccount) DecodeMsg ¶
func (z *RedditAccount) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*RedditAccount) EncodeMsg ¶
func (z *RedditAccount) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*RedditAccount) MarshalMsg ¶
func (z *RedditAccount) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*RedditAccount) Msgsize ¶
func (z *RedditAccount) Msgsize() (s int)
func (*RedditAccount) UnmarshalMsg ¶
func (z *RedditAccount) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler