Beispiel #1
0
func (c *Column) Write(w io.Writer) error {
	err := iohelper.WriteVarBytes(w, c.Family)
	if err != nil {
		return errors.Trace(err)
	}

	err = iohelper.WriteVarBytes(w, c.Qual)
	if err != nil {
		return errors.Trace(err)
	}

	return nil
}
Beispiel #2
0
func (l *themisLock) write(w io.Writer) {
	binary.Write(w, binary.BigEndian, byte(l.typ))
	binary.Write(w, binary.BigEndian, int64(l.ts))
	// write client addr
	iohelper.WriteVarBytes(w, []byte(l.clientAddr))
	binary.Write(w, binary.BigEndian, int64(l.wallTs))
}
Beispiel #3
0
func (c *ColumnCoordinate) Write(w io.Writer) error {
	err := iohelper.WriteVarBytes(w, c.Table)
	if err != nil {
		return errors.Trace(err)
	}

	err = iohelper.WriteVarBytes(w, c.Row)
	if err != nil {
		return errors.Trace(err)
	}

	err = c.Column.Write(w)
	if err != nil {
		return errors.Trace(err)
	}

	return nil
}
Beispiel #4
0
func encode(parts ...[]byte) ([]byte, error) {
	buf := &bytes.Buffer{}
	for _, p := range parts {
		err := iohelper.WriteVarBytes(buf, p)
		if err != nil {
			return nil, err
		}
	}
	return buf.Bytes(), nil
}
Beispiel #5
0
func (c *ColumnCoordinate) Write(w io.Writer) {
	iohelper.WriteVarBytes(w, c.Table)
	iohelper.WriteVarBytes(w, c.Row)
	c.Column.Write(w)
}
Beispiel #6
0
func (c *Column) Write(w io.Writer) {
	iohelper.WriteVarBytes(w, c.Family)
	iohelper.WriteVarBytes(w, c.Qual)
}