gencode

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: 7 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 MemInfo benches for Marshal/Unmarshal.

func BenchRedditAccount

func BenchRedditAccount() []benchutil.Bench

BenchRedditAccount runs the MemInfo benches for Marshal/Unmarshal.

Types

type AccountData

type AccountData struct {
	CommentKarma int64
	HasMail      bool
	HasModMail   bool
	ID           string
	InboxCount   int64
	IsFriend     bool
	IsGold       bool
	LinkKarma    int64
	ModHash      string
	Name         string
	Over18       bool
}

func (*AccountData) Marshal

func (d *AccountData) Marshal(buf []byte) ([]byte, error)

func (*AccountData) Size

func (d *AccountData) Size() (s uint64)

func (*AccountData) Unmarshal

func (d *AccountData) Unmarshal(buf []byte) (uint64, error)

type BasicMemInfo

type BasicMemInfo struct {
	MemTotal     int64
	MemFree      int64
	MemAvailable int64
	Buffers      int64
	Cached       int64
	SwapCached   int64
	SwapTotal    int64
	SwapFree     int64
}

func PrepareBasicMemInfoData

func PrepareBasicMemInfoData(data []shared.ShBasicMemInfo) []BasicMemInfo

PrepareBasicMemInfoData generates the gencode version of the data.

func (*BasicMemInfo) Marshal

func (d *BasicMemInfo) Marshal(buf []byte) ([]byte, error)

func (*BasicMemInfo) Size

func (d *BasicMemInfo) Size() (s uint64)

func (*BasicMemInfo) Unmarshal

func (d *BasicMemInfo) Unmarshal(buf []byte) (uint64, error)

type CPU

type CPU struct {
	Processor       int16
	VendorID        string
	CPUFamily       string
	Model           string
	ModelName       string
	Stepping        string
	Microcode       string
	CPUMHz          float32
	CacheSize       string
	PhysicalID      int16
	Siblings        int16
	CoreID          int16
	CPUCores        int16
	ApicID          int16
	InitialApicID   int16
	FPU             string
	FPUException    string
	CPUIDLevel      string
	WP              string
	Flags           string
	BogoMIPS        float32
	CLFlushSize     string
	CacheAlignment  string
	AddressSizes    string
	PowerManagement string
}

func (*CPU) Marshal

func (d *CPU) Marshal(buf []byte) ([]byte, error)

func (*CPU) Size

func (d *CPU) Size() (s uint64)

func (*CPU) Unmarshal

func (d *CPU) Unmarshal(buf []byte) (uint64, error)

type CPUInfo

type CPUInfo struct {
	CPUs []CPU
}

func PrepareCPUInfoData

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

PrepareCPUInfoData generates the gencode version of the data.

func (*CPUInfo) Marshal

func (d *CPUInfo) Marshal(buf []byte) ([]byte, error)

func (*CPUInfo) Size

func (d *CPUInfo) Size() (s uint64)

func (*CPUInfo) Unmarshal

func (d *CPUInfo) Unmarshal(buf []byte) (uint64, error)

type MemInfo

type MemInfo struct {
	MemTotal          int64
	MemFree           int64
	MemAvailable      int64
	Buffers           int64
	Cached            int64
	SwapCached        int64
	Active            int64
	Inactive          int64
	ActiveAnon        int64
	InactiveAnon      int64
	ActiveFile        int64
	InactiveFile      int64
	Unevictable       int64
	Mlocked           int64
	SwapTotal         int64
	SwapFree          int64
	Dirty             int64
	Writeback         int64
	AnonPages         int64
	Mapped            int64
	Shmem             int64
	Slab              int64
	SReclaimable      int64
	SUnreclaim        int64
	KernelStack       int64
	NFSUnstable       int64
	Bounce            int64
	WritebackTmp      int64
	CommitLimit       int64
	VmallocTotal      int64
	VmallocUsed       int64
	VmallocChunk      int64
	HardwareCorrupted int64
	AnonHugePages     int64
	HugePagesTotal    int64
	HugePagesFree     int64
	HugePagesRsvd     int64
	Hugepagesize      int64
	DirectMap4k       int64
	DirectMap2M       int64
}

func PrepareMemInfoData

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

PrepareMemInfoData generates the gencode version of the data.

func (*MemInfo) Marshal

func (d *MemInfo) Marshal(buf []byte) ([]byte, error)

func (*MemInfo) Size

func (d *MemInfo) Size() (s uint64)

func (*MemInfo) Unmarshal

func (d *MemInfo) Unmarshal(buf []byte) (uint64, error)

type Message

type Message struct {
	ID     []byte
	DestID uint32
	Type   int8
	Kind   int16
	Data   []byte
}

func PrepareMessageData

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

PrepareMessageData generates the gencode version of the data.

func (*Message) Marshal

func (d *Message) Marshal(buf []byte) ([]byte, error)

func (*Message) Size

func (d *Message) Size() (s uint64)

func (*Message) Unmarshal

func (d *Message) Unmarshal(buf []byte) (uint64, error)

type RedditAccount

type RedditAccount struct {
	ID   string
	Name string
	Kind string
	Data AccountData
}

func PrepareRedditAccountData

func PrepareRedditAccountData(data []shared.ShRedditAccount) []RedditAccount

PrepareRedditAccountData generates the gencode version of the data.

func (*RedditAccount) Marshal

func (d *RedditAccount) Marshal(buf []byte) ([]byte, error)

func (*RedditAccount) Size

func (d *RedditAccount) Size() (s uint64)

func (*RedditAccount) Unmarshal

func (d *RedditAccount) Unmarshal(buf []byte) (uint64, error)

Jump to

Keyboard shortcuts

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