tmsgp

package
v0.0.0-...-9074d79 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BenchBasicMemInfo

func BenchBasicMemInfo() []benchutil.Bench

BenchBasicMemInfo runs the BasicMemInfo benches for Marshal/Unmarshal.

func BenchCPUInfo

func BenchCPUInfo(n int) []benchutil.Bench

BenchCPUInfo runs the CPUInfo benches for Marshal/Unmarshal.

func BenchMemInfo

func BenchMemInfo() []benchutil.Bench

BenchMemInfo runs the MemInfo benches for Marshal/Unmarshal.

func BenchMessage

func BenchMessage(l int) []benchutil.Bench

BenchMessage runs the Message benches for Marshal/Unmarshal.

func BenchRedditAccount

func BenchRedditAccount() []benchutil.Bench

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) DecodeMsg

func (z *CPU) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*CPU) EncodeMsg

func (z *CPU) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*CPU) MarshalMsg

func (z *CPU) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*CPU) Msgsize

func (z *CPU) Msgsize() (s int)

func (*CPU) UnmarshalMsg

func (z *CPU) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type CPUInfo

type CPUInfo struct {
	CPUs []CPU `msg:cpus`
}

func PrepareCPUInfoData

func PrepareCPUInfoData(data []shared.ShCPUInfo) []CPUInfo

PrepareCPUInfoData generates the protobuf version of the data.

func (*CPUInfo) DecodeMsg

func (z *CPUInfo) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*CPUInfo) EncodeMsg

func (z *CPUInfo) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*CPUInfo) MarshalMsg

func (z *CPUInfo) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*CPUInfo) Msgsize

func (z *CPUInfo) Msgsize() (s int)

func (*CPUInfo) UnmarshalMsg

func (z *CPUInfo) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

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

func PrepareMemInfoData(data []shared.ShMemInfo) []MemInfo

PrepareMemInfoData generates the protobuf version of the data.

func (*MemInfo) DecodeMsg

func (z *MemInfo) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*MemInfo) EncodeMsg

func (z *MemInfo) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*MemInfo) MarshalMsg

func (z *MemInfo) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*MemInfo) Msgsize

func (z *MemInfo) Msgsize() (s int)

func (*MemInfo) UnmarshalMsg

func (z *MemInfo) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

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

func PrepareMessageData(data []shared.ShMessage) []Message

PrepareMessageData generates the protobuf version of the data.

func (*Message) DecodeMsg

func (z *Message) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*Message) EncodeMsg

func (z *Message) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*Message) MarshalMsg

func (z *Message) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*Message) Msgsize

func (z *Message) Msgsize() (s int)

func (*Message) UnmarshalMsg

func (z *Message) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL