device

package
v0.0.0-...-0dcfdb9 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

* Stub for a Steady device in Go, only used to make the device config, * please see the C implementation of the device for now.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeDevice

func MakeDevice(sk, vk, pub []byte,
	timeout, space, time uint64,
	path, server, token string) (*steady.Policy, error)

Types

type Device

type Device struct {
	Sk     []byte
	Policy steady.Policy
	// contains filtered or unexported fields
}

func LoadDevice

func LoadDevice(path, server, token string, encrypt, compress bool,
	flushSize int, blockBufferNum int) (*Device, error)

estimating memory usage: flushSize*(blockBufferNum+1) LoadDevice loads a device from the given fs path

func (*Device) Close

func (d *Device) Close() error

Close flushes the device, closes connection to the relay, and frees all resources. Afterwards the device can no longer be used to log.

func (*Device) Log

func (d *Device) Log(msg string) error

Log (on device)

type DeviceState

type DeviceState struct {
	NextIndex, TimePrev, LenPrev uint64
}

Jump to

Keyboard shortcuts

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