proto

package
v0.0.0-...-4f1acfd Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2013 License: BSD-2-Clause Imports: 3 Imported by: 1

Documentation

Overview

Protocol messages and binary recordio writer from the zookeeper.jute protocol definition.

Uses the gen subdirectory to build this package. Use make to keep the protocol definition up to date.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ACL

type ACL struct {
	Perms int32
	Id    Id
}

func (*ACL) Decode

func (m *ACL) Decode(in Input) error

func (*ACL) Encode

func (m *ACL) Encode(o Output) error

func (*ACL) String

func (m *ACL) String() string

type AuthPacket

type AuthPacket struct {
	Type   int32
	Scheme string
	Auth   []byte
}

func (*AuthPacket) Decode

func (m *AuthPacket) Decode(in Input) error

func (*AuthPacket) Encode

func (m *AuthPacket) Encode(o Output) error

func (*AuthPacket) String

func (m *AuthPacket) String() string

type BinaryReader

type BinaryReader struct {
	io.Reader
}

func (BinaryReader) ReadBool

func (r BinaryReader) ReadBool() (bool, error)

func (BinaryReader) ReadBuffer

func (r BinaryReader) ReadBuffer() ([]byte, error)

func (BinaryReader) ReadInt32

func (r BinaryReader) ReadInt32() (int32, error)

func (BinaryReader) ReadInt64

func (r BinaryReader) ReadInt64() (int64, error)

func (BinaryReader) ReadString

func (r BinaryReader) ReadString() (string, error)

type BinaryWriter

type BinaryWriter struct {
	io.Writer
}

func (BinaryWriter) WriteBool

func (w BinaryWriter) WriteBool(val bool) error

func (BinaryWriter) WriteBuffer

func (w BinaryWriter) WriteBuffer(val []byte) error

func (BinaryWriter) WriteInt32

func (w BinaryWriter) WriteInt32(val int32) error

func (BinaryWriter) WriteInt64

func (w BinaryWriter) WriteInt64(val int64) error

func (BinaryWriter) WriteString

func (w BinaryWriter) WriteString(val string) error

type CheckVersionRequest

type CheckVersionRequest struct {
	Path    string
	Version int32
}

func (*CheckVersionRequest) Decode

func (m *CheckVersionRequest) Decode(in Input) error

func (*CheckVersionRequest) Encode

func (m *CheckVersionRequest) Encode(o Output) error

func (*CheckVersionRequest) String

func (m *CheckVersionRequest) String() string

type CheckVersionTxn

type CheckVersionTxn struct {
	Path    string
	Version int32
}

func (*CheckVersionTxn) Decode

func (m *CheckVersionTxn) Decode(in Input) error

func (*CheckVersionTxn) Encode

func (m *CheckVersionTxn) Encode(o Output) error

func (*CheckVersionTxn) String

func (m *CheckVersionTxn) String() string

type ConnectRequest

type ConnectRequest struct {
	ProtocolVersion int32
	LastZxidSeen    int64
	TimeOut         int32
	SessionId       int64
	Passwd          []byte
}

func (*ConnectRequest) Decode

func (m *ConnectRequest) Decode(in Input) error

func (*ConnectRequest) Encode

func (m *ConnectRequest) Encode(o Output) error

func (*ConnectRequest) String

func (m *ConnectRequest) String() string

type ConnectResponse

type ConnectResponse struct {
	ProtocolVersion int32
	TimeOut         int32
	SessionId       int64
	Passwd          []byte
}

func (*ConnectResponse) Decode

func (m *ConnectResponse) Decode(in Input) error

func (*ConnectResponse) Encode

func (m *ConnectResponse) Encode(o Output) error

func (*ConnectResponse) String

func (m *ConnectResponse) String() string

type CreateRequest

type CreateRequest struct {
	Path  string
	Data  []byte
	Acl   []ACL
	Flags int32
}

func (*CreateRequest) Decode

func (m *CreateRequest) Decode(in Input) error

func (*CreateRequest) Encode

func (m *CreateRequest) Encode(o Output) error

func (*CreateRequest) String

func (m *CreateRequest) String() string

type CreateResponse

type CreateResponse struct {
	Path string
}

func (*CreateResponse) Decode

func (m *CreateResponse) Decode(in Input) error

func (*CreateResponse) Encode

func (m *CreateResponse) Encode(o Output) error

func (*CreateResponse) String

func (m *CreateResponse) String() string

type CreateSessionTxn

type CreateSessionTxn struct {
	TimeOut int32
}

func (*CreateSessionTxn) Decode

func (m *CreateSessionTxn) Decode(in Input) error

func (*CreateSessionTxn) Encode

func (m *CreateSessionTxn) Encode(o Output) error

func (*CreateSessionTxn) String

func (m *CreateSessionTxn) String() string

type CreateTxn

type CreateTxn struct {
	Path           string
	Data           []byte
	Acl            []ACL
	Ephemeral      bool
	ParentCVersion int32
}

func (*CreateTxn) Decode

func (m *CreateTxn) Decode(in Input) error

func (*CreateTxn) Encode

func (m *CreateTxn) Encode(o Output) error

func (*CreateTxn) String

func (m *CreateTxn) String() string

type CreateTxnV0

type CreateTxnV0 struct {
	Path      string
	Data      []byte
	Acl       []ACL
	Ephemeral bool
}

func (*CreateTxnV0) Decode

func (m *CreateTxnV0) Decode(in Input) error

func (*CreateTxnV0) Encode

func (m *CreateTxnV0) Encode(o Output) error

func (*CreateTxnV0) String

func (m *CreateTxnV0) String() string

type Decodable

type Decodable interface {
	Decode(Input) error
}

type DeleteRequest

type DeleteRequest struct {
	Path    string
	Version int32
}

func (*DeleteRequest) Decode

func (m *DeleteRequest) Decode(in Input) error

func (*DeleteRequest) Encode

func (m *DeleteRequest) Encode(o Output) error

func (*DeleteRequest) String

func (m *DeleteRequest) String() string

type DeleteTxn

type DeleteTxn struct {
	Path string
}

func (*DeleteTxn) Decode

func (m *DeleteTxn) Decode(in Input) error

func (*DeleteTxn) Encode

func (m *DeleteTxn) Encode(o Output) error

func (*DeleteTxn) String

func (m *DeleteTxn) String() string

type Encodable

type Encodable interface {
	Encode(Output) error
}

type ErrorResponse

type ErrorResponse struct {
	Err int32
}

func (*ErrorResponse) Decode

func (m *ErrorResponse) Decode(in Input) error

func (*ErrorResponse) Encode

func (m *ErrorResponse) Encode(o Output) error

func (*ErrorResponse) String

func (m *ErrorResponse) String() string

type ErrorTxn

type ErrorTxn struct {
	Err int32
}

func (*ErrorTxn) Decode

func (m *ErrorTxn) Decode(in Input) error

func (*ErrorTxn) Encode

func (m *ErrorTxn) Encode(o Output) error

func (*ErrorTxn) String

func (m *ErrorTxn) String() string

type ExistsRequest

type ExistsRequest struct {
	Path  string
	Watch bool
}

func (*ExistsRequest) Decode

func (m *ExistsRequest) Decode(in Input) error

func (*ExistsRequest) Encode

func (m *ExistsRequest) Encode(o Output) error

func (*ExistsRequest) String

func (m *ExistsRequest) String() string

type ExistsResponse

type ExistsResponse struct {
	Stat Stat
}

func (*ExistsResponse) Decode

func (m *ExistsResponse) Decode(in Input) error

func (*ExistsResponse) Encode

func (m *ExistsResponse) Encode(o Output) error

func (*ExistsResponse) String

func (m *ExistsResponse) String() string

type FileHeader

type FileHeader struct {
	Magic   int32
	Version int32
	Dbid    int64
}

func (*FileHeader) Decode

func (m *FileHeader) Decode(in Input) error

func (*FileHeader) Encode

func (m *FileHeader) Encode(o Output) error

func (*FileHeader) String

func (m *FileHeader) String() string

type GetACLRequest

type GetACLRequest struct {
	Path string
}

func (*GetACLRequest) Decode

func (m *GetACLRequest) Decode(in Input) error

func (*GetACLRequest) Encode

func (m *GetACLRequest) Encode(o Output) error

func (*GetACLRequest) String

func (m *GetACLRequest) String() string

type GetACLResponse

type GetACLResponse struct {
	Acl  []ACL
	Stat Stat
}

func (*GetACLResponse) Decode

func (m *GetACLResponse) Decode(in Input) error

func (*GetACLResponse) Encode

func (m *GetACLResponse) Encode(o Output) error

func (*GetACLResponse) String

func (m *GetACLResponse) String() string

type GetChildren2Request

type GetChildren2Request struct {
	Path  string
	Watch bool
}

func (*GetChildren2Request) Decode

func (m *GetChildren2Request) Decode(in Input) error

func (*GetChildren2Request) Encode

func (m *GetChildren2Request) Encode(o Output) error

func (*GetChildren2Request) String

func (m *GetChildren2Request) String() string

type GetChildren2Response

type GetChildren2Response struct {
	Children []string
	Stat     Stat
}

func (*GetChildren2Response) Decode

func (m *GetChildren2Response) Decode(in Input) error

func (*GetChildren2Response) Encode

func (m *GetChildren2Response) Encode(o Output) error

func (*GetChildren2Response) String

func (m *GetChildren2Response) String() string

type GetChildrenRequest

type GetChildrenRequest struct {
	Path  string
	Watch bool
}

func (*GetChildrenRequest) Decode

func (m *GetChildrenRequest) Decode(in Input) error

func (*GetChildrenRequest) Encode

func (m *GetChildrenRequest) Encode(o Output) error

func (*GetChildrenRequest) String

func (m *GetChildrenRequest) String() string

type GetChildrenResponse

type GetChildrenResponse struct {
	Children []string
}

func (*GetChildrenResponse) Decode

func (m *GetChildrenResponse) Decode(in Input) error

func (*GetChildrenResponse) Encode

func (m *GetChildrenResponse) Encode(o Output) error

func (*GetChildrenResponse) String

func (m *GetChildrenResponse) String() string

type GetDataRequest

type GetDataRequest struct {
	Path  string
	Watch bool
}

func (*GetDataRequest) Decode

func (m *GetDataRequest) Decode(in Input) error

func (*GetDataRequest) Encode

func (m *GetDataRequest) Encode(o Output) error

func (*GetDataRequest) String

func (m *GetDataRequest) String() string

type GetDataResponse

type GetDataResponse struct {
	Data []byte
	Stat Stat
}

func (*GetDataResponse) Decode

func (m *GetDataResponse) Decode(in Input) error

func (*GetDataResponse) Encode

func (m *GetDataResponse) Encode(o Output) error

func (*GetDataResponse) String

func (m *GetDataResponse) String() string

type GetMaxChildrenRequest

type GetMaxChildrenRequest struct {
	Path string
}

func (*GetMaxChildrenRequest) Decode

func (m *GetMaxChildrenRequest) Decode(in Input) error

func (*GetMaxChildrenRequest) Encode

func (m *GetMaxChildrenRequest) Encode(o Output) error

func (*GetMaxChildrenRequest) String

func (m *GetMaxChildrenRequest) String() string

type GetMaxChildrenResponse

type GetMaxChildrenResponse struct {
	Max int32
}

func (*GetMaxChildrenResponse) Decode

func (m *GetMaxChildrenResponse) Decode(in Input) error

func (*GetMaxChildrenResponse) Encode

func (m *GetMaxChildrenResponse) Encode(o Output) error

func (*GetMaxChildrenResponse) String

func (m *GetMaxChildrenResponse) String() string

type GetSASLRequest

type GetSASLRequest struct {
	Token []byte
}

func (*GetSASLRequest) Decode

func (m *GetSASLRequest) Decode(in Input) error

func (*GetSASLRequest) Encode

func (m *GetSASLRequest) Encode(o Output) error

func (*GetSASLRequest) String

func (m *GetSASLRequest) String() string

type Id

type Id struct {
	Scheme string
	Id     string
}

func (*Id) Decode

func (m *Id) Decode(in Input) error

func (*Id) Encode

func (m *Id) Encode(o Output) error

func (*Id) String

func (m *Id) String() string

type Input

type Input interface {
	ReadBool() (bool, error)
	ReadInt32() (int32, error)
	ReadInt64() (int64, error)
	ReadString() (string, error)
	ReadBuffer() ([]byte, error)
}

type LearnerInfo

type LearnerInfo struct {
	Serverid        int64
	ProtocolVersion int32
}

func (*LearnerInfo) Decode

func (m *LearnerInfo) Decode(in Input) error

func (*LearnerInfo) Encode

func (m *LearnerInfo) Encode(o Output) error

func (*LearnerInfo) String

func (m *LearnerInfo) String() string

type MultiHeader

type MultiHeader struct {
	Type int32
	Done bool
	Err  int32
}

func (*MultiHeader) Decode

func (m *MultiHeader) Decode(in Input) error

func (*MultiHeader) Encode

func (m *MultiHeader) Encode(o Output) error

func (*MultiHeader) String

func (m *MultiHeader) String() string

type MultiTxn

type MultiTxn struct {
	Txns []Txn
}

func (*MultiTxn) Decode

func (m *MultiTxn) Decode(in Input) error

func (*MultiTxn) Encode

func (m *MultiTxn) Encode(o Output) error

func (*MultiTxn) String

func (m *MultiTxn) String() string

type Output

type Output interface {
	WriteBool(bool) error
	WriteInt32(int32) error
	WriteInt64(int64) error
	WriteString(string) error
	WriteBuffer([]byte) error
}

type QuorumPacket

type QuorumPacket struct {
	Type     int32
	Zxid     int64
	Data     []byte
	Authinfo []Id
}

func (*QuorumPacket) Decode

func (m *QuorumPacket) Decode(in Input) error

func (*QuorumPacket) Encode

func (m *QuorumPacket) Encode(o Output) error

func (*QuorumPacket) String

func (m *QuorumPacket) String() string

type ReplyHeader

type ReplyHeader struct {
	Xid  int32
	Zxid int64
	Err  int32
}

func (*ReplyHeader) Decode

func (m *ReplyHeader) Decode(in Input) error

func (*ReplyHeader) Encode

func (m *ReplyHeader) Encode(o Output) error

func (*ReplyHeader) String

func (m *ReplyHeader) String() string

type RequestHeader

type RequestHeader struct {
	Xid  int32
	Type int32
}

func (*RequestHeader) Decode

func (m *RequestHeader) Decode(in Input) error

func (*RequestHeader) Encode

func (m *RequestHeader) Encode(o Output) error

func (*RequestHeader) String

func (m *RequestHeader) String() string

type SetACLRequest

type SetACLRequest struct {
	Path    string
	Acl     []ACL
	Version int32
}

func (*SetACLRequest) Decode

func (m *SetACLRequest) Decode(in Input) error

func (*SetACLRequest) Encode

func (m *SetACLRequest) Encode(o Output) error

func (*SetACLRequest) String

func (m *SetACLRequest) String() string

type SetACLResponse

type SetACLResponse struct {
	Stat Stat
}

func (*SetACLResponse) Decode

func (m *SetACLResponse) Decode(in Input) error

func (*SetACLResponse) Encode

func (m *SetACLResponse) Encode(o Output) error

func (*SetACLResponse) String

func (m *SetACLResponse) String() string

type SetACLTxn

type SetACLTxn struct {
	Path    string
	Acl     []ACL
	Version int32
}

func (*SetACLTxn) Decode

func (m *SetACLTxn) Decode(in Input) error

func (*SetACLTxn) Encode

func (m *SetACLTxn) Encode(o Output) error

func (*SetACLTxn) String

func (m *SetACLTxn) String() string

type SetDataRequest

type SetDataRequest struct {
	Path    string
	Data    []byte
	Version int32
}

func (*SetDataRequest) Decode

func (m *SetDataRequest) Decode(in Input) error

func (*SetDataRequest) Encode

func (m *SetDataRequest) Encode(o Output) error

func (*SetDataRequest) String

func (m *SetDataRequest) String() string

type SetDataResponse

type SetDataResponse struct {
	Stat Stat
}

func (*SetDataResponse) Decode

func (m *SetDataResponse) Decode(in Input) error

func (*SetDataResponse) Encode

func (m *SetDataResponse) Encode(o Output) error

func (*SetDataResponse) String

func (m *SetDataResponse) String() string

type SetDataTxn

type SetDataTxn struct {
	Path    string
	Data    []byte
	Version int32
}

func (*SetDataTxn) Decode

func (m *SetDataTxn) Decode(in Input) error

func (*SetDataTxn) Encode

func (m *SetDataTxn) Encode(o Output) error

func (*SetDataTxn) String

func (m *SetDataTxn) String() string

type SetMaxChildrenRequest

type SetMaxChildrenRequest struct {
	Path string
	Max  int32
}

func (*SetMaxChildrenRequest) Decode

func (m *SetMaxChildrenRequest) Decode(in Input) error

func (*SetMaxChildrenRequest) Encode

func (m *SetMaxChildrenRequest) Encode(o Output) error

func (*SetMaxChildrenRequest) String

func (m *SetMaxChildrenRequest) String() string

type SetMaxChildrenTxn

type SetMaxChildrenTxn struct {
	Path string
	Max  int32
}

func (*SetMaxChildrenTxn) Decode

func (m *SetMaxChildrenTxn) Decode(in Input) error

func (*SetMaxChildrenTxn) Encode

func (m *SetMaxChildrenTxn) Encode(o Output) error

func (*SetMaxChildrenTxn) String

func (m *SetMaxChildrenTxn) String() string

type SetSASLRequest

type SetSASLRequest struct {
	Token []byte
}

func (*SetSASLRequest) Decode

func (m *SetSASLRequest) Decode(in Input) error

func (*SetSASLRequest) Encode

func (m *SetSASLRequest) Encode(o Output) error

func (*SetSASLRequest) String

func (m *SetSASLRequest) String() string

type SetSASLResponse

type SetSASLResponse struct {
	Token []byte
}

func (*SetSASLResponse) Decode

func (m *SetSASLResponse) Decode(in Input) error

func (*SetSASLResponse) Encode

func (m *SetSASLResponse) Encode(o Output) error

func (*SetSASLResponse) String

func (m *SetSASLResponse) String() string

type SetWatches

type SetWatches struct {
	RelativeZxid int64
	DataWatches  []string
	ExistWatches []string
	ChildWatches []string
}

func (*SetWatches) Decode

func (m *SetWatches) Decode(in Input) error

func (*SetWatches) Encode

func (m *SetWatches) Encode(o Output) error

func (*SetWatches) String

func (m *SetWatches) String() string

type Stat

type Stat struct {
	Czxid          int64
	Mzxid          int64
	Ctime          int64
	Mtime          int64
	Version        int32
	Cversion       int32
	Aversion       int32
	EphemeralOwner int64
	DataLength     int32
	NumChildren    int32
	Pzxid          int64
}

func (*Stat) Decode

func (m *Stat) Decode(in Input) error

func (*Stat) Encode

func (m *Stat) Encode(o Output) error

func (*Stat) String

func (m *Stat) String() string

type StatPersisted

type StatPersisted struct {
	Czxid          int64
	Mzxid          int64
	Ctime          int64
	Mtime          int64
	Version        int32
	Cversion       int32
	Aversion       int32
	EphemeralOwner int64
	Pzxid          int64
}

func (*StatPersisted) Decode

func (m *StatPersisted) Decode(in Input) error

func (*StatPersisted) Encode

func (m *StatPersisted) Encode(o Output) error

func (*StatPersisted) String

func (m *StatPersisted) String() string

type StatPersistedV1

type StatPersistedV1 struct {
	Czxid          int64
	Mzxid          int64
	Ctime          int64
	Mtime          int64
	Version        int32
	Cversion       int32
	Aversion       int32
	EphemeralOwner int64
}

func (*StatPersistedV1) Decode

func (m *StatPersistedV1) Decode(in Input) error

func (*StatPersistedV1) Encode

func (m *StatPersistedV1) Encode(o Output) error

func (*StatPersistedV1) String

func (m *StatPersistedV1) String() string

type SyncRequest

type SyncRequest struct {
	Path string
}

func (*SyncRequest) Decode

func (m *SyncRequest) Decode(in Input) error

func (*SyncRequest) Encode

func (m *SyncRequest) Encode(o Output) error

func (*SyncRequest) String

func (m *SyncRequest) String() string

type SyncResponse

type SyncResponse struct {
	Path string
}

func (*SyncResponse) Decode

func (m *SyncResponse) Decode(in Input) error

func (*SyncResponse) Encode

func (m *SyncResponse) Encode(o Output) error

func (*SyncResponse) String

func (m *SyncResponse) String() string

type Txn

type Txn struct {
	Type int32
	Data []byte
}

func (*Txn) Decode

func (m *Txn) Decode(in Input) error

func (*Txn) Encode

func (m *Txn) Encode(o Output) error

func (*Txn) String

func (m *Txn) String() string

type TxnHeader

type TxnHeader struct {
	ClientId int64
	Cxid     int32
	Zxid     int64
	Time     int64
	Type     int32
}

func (*TxnHeader) Decode

func (m *TxnHeader) Decode(in Input) error

func (*TxnHeader) Encode

func (m *TxnHeader) Encode(o Output) error

func (*TxnHeader) String

func (m *TxnHeader) String() string

type WatcherEvent

type WatcherEvent struct {
	Type  int32
	State int32
	Path  string
}

func (*WatcherEvent) Decode

func (m *WatcherEvent) Decode(in Input) error

func (*WatcherEvent) Encode

func (m *WatcherEvent) Encode(o Output) error

func (*WatcherEvent) String

func (m *WatcherEvent) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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