xenstore

package
Version: v0.0.0-...-b957d1f Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2017 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeDebug = iota
	TypeDirectory
	TypeRead
	TypeGetPerms
	TypeWatch
	TypeUnwatch
	TypeTransactionStart
	TypeTransactionEnd
	TypeIntroduce
	TypeRelease
	TypeGetDomainPath
	TypeWrite
	TypeMkdir
	TypeRm
	TypeSetPerms
	TypeWatchEvent
	TypeError
	TypeIsDomainIntroduced
	TypeResume
	TypeSetTarget
	TypeRestrict
	TypeResetWatches

	TypeInvalid = 0xffff
)
View Source
const (
	StateUnknown = iota
	StateInitialising
	StateInitWait
	StateInitialised
	StateConnected
	StateClosing
	StateClosed
	StateReconfiguring
	StateReconfigured
)
View Source
const (
	WatchPath = iota
	WatchToken
)
View Source
const MessageHeaderSize = unsafe.Sizeof(MessageHeader{})

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error interface {
	error

	Retry() bool
}

type MessageHeader

type MessageHeader struct {
	Type        uint32
	RequestID   uint32
	Transaction uint32
	Length      uint32
}

type Request

type Request struct {
	Type        uint32
	ID          uint32
	Transaction uint32
	// contains filtered or unexported fields
}

func NewRequest

func NewRequest(reqType uint32, tx uint32) *Request

func (*Request) WriteBytes

func (r *Request) WriteBytes(b []byte)

func (*Request) WriteString

func (r *Request) WriteString(s string)

func (*Request) WriteUint32

func (r *Request) WriteUint32(i uint32)

type Response

type Response struct {
	Type      uint32
	RequestID uint32
	// contains filtered or unexported fields
}

func Read

func Read(path string) *Response

func Send

func Send(req *Request) *Response

func (*Response) Err

func (rsp *Response) Err() error

func (*Response) ReadBytes

func (rsp *Response) ReadBytes() ([]byte, error)

func (*Response) ReadString

func (rsp *Response) ReadString() (string, error)

ReadString reads the next null-terminated value from the response and returns it as a string (without the null terminator).

func (*Response) ReadUint32

func (rsp *Response) ReadUint32() (uint32, error)

type Transaction

type Transaction struct {
	// contains filtered or unexported fields
}

func TransactionStart

func TransactionStart() (*Transaction, error)

func (*Transaction) Commit

func (tx *Transaction) Commit() (committed bool, err error)

func (*Transaction) ReadInt

func (tx *Transaction) ReadInt(path string) (int, error)

func (*Transaction) WriteInt

func (tx *Transaction) WriteInt(path string, i int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL