tkrzw_rpc

package module
v0.0.0-...-698cfdd Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2021 License: Apache-2.0 Imports: 17 Imported by: 4

README

===============================================================
 Go client library of Tkrzw-RPC
================================================================

Please read the following documents.

  COPYING           - license
  CONTRIBUTING.md   - how to contribute

This package provides a Go client library to access the service
via gRPC protocol.  This package is independent of the core library
of Tkrzw.  You don't have to install the core library.  Meanwhile,
you have to install the library of gRPC for Go as described in
the official document.  Go 14.7 or later is required to use this
package.

Enter the directory of the extracted package then perform installation.
If your system has another command except for the "go"
command, edit the Makefile beforehand.  Then, run these commands.

 make
 sudo make install

To perform the tests, run these command on two respective terminals.

 tkrzw_server
 make check

See the homepage for details: https://dbmx.net/tkrzw-rpc/

Thanks.

== END OF FILE ==

Documentation

Overview

Go client library of Tkrzw-RPC

The core package of Tkrzw-RPC provides a server program which manages databases of Tkrzw. This package provides a Python client library to access the service via gRPC protocol. Tkrzw is a library to mange key-value storages in various algorithms. With Tkrzw, the application can handle database files efficiently in process without any network overhead. However, it means that multiple processes cannot open the same database file simultaneously. Tkrzw-RPC solves the issue by using a server program which manages database files and allowing other processes access the contents via RPC.

The class "RemoteDBM" has a similar API to the local DBM API, which represents an associative array aka a map[[]byte][]byte in Go. Read the homepage https://dbmx.net/tkrzw-rpc/ for details.

All identifiers are defined under the package "tkrzw_rpc", which can be imported in source files of application programs as "github.com/estraier/tkrzw-rpc-go".

import "github.com/estraier/tkrzw-rpc-go"

An instance of the struct "RemoteDBM" is used in order to handle a database connection. You can store, delete, and retrieve records with the instance. The result status of each operation is represented by an object of the struct "Status". Iterator to access each record is implemented by the struct "Iterator".

The key and the value of the records are stored as byte arrays. However, you can specify strings and other types which imlements the Stringer interface whereby the object is converted into a byte array.

If you write the above import directive and prepare the "go.mod" file, the Go module for Tkrzw-RPC is installed implicitly when you run "go get". Go 1.14 or later is required to use this package.

The following code is a simple example to use a database, without checking errors. Many methods accept both byte arrays and strings. If strings are given, they are converted implicitly into byte arrays.

package main

import (
  "fmt"
  "github.com/estraier/tkrzw-rpc-go"
)

func main() {
  // Prepares the database.
  dbm := tkrzw_rpc.NewRemoteDBM()
  dbm.Connect("127.0.0.1:1978", -1, "")

  // Sets records.
  // Keys and values are implicitly converted into bytes.
  dbm.Set("first", "hop", true)
  dbm.Set("second", "step", true)
  dbm.Set("third", "jump", true)

  // Retrieves record values as strings.
  fmt.Println(dbm.GetStrSimple("first", "*"))
  fmt.Println(dbm.GetStrSimple("second", "*"))
  fmt.Println(dbm.GetStrSimple("third", "*"))

  // Checks and deletes a record.
  if dbm.Check("first") {
    dbm.Remove("first")
  }

  // Traverses records with a range over a channel.
  for record := range dbm.EachStr() {
    fmt.Println(record.Key, record.Value)
  }

  // Closes the connection.
  dbm.Disconnect()
}

The following code is an advanced example where a so-called long transaction is done by the compare-and-exchange (aka compare-and-swap) idiom. The example also shows how to use the iterator to access each record.

package main

import (
  "fmt"
  "github.com/estraier/tkrzw-rpc-go"
)

func main() {
  // Prepares the database.
  // The timeout is in seconds.
  // The method OrDie causes panic if the status is not success.
  // You should write your own error handling in large scale programs.
  dbm := tkrzw_rpc.NewRemoteDBM()
  dbm.Connect("localhost:1978", 10, "").OrDie()

  // Closes the connection for sure and checks the error too.
  defer func() { dbm.Disconnect().OrDie() }()

  // Two bank accounts for Bob and Alice.
  // Numeric values are converted into strings implicitly.
  dbm.Set("Bob", 1000, false).OrDie()
  dbm.Set("Alice", 3000, false).OrDie()

  // Function to do a money transfer atomically.
  transfer := func(src_key string, dest_key string, amount int64) *tkrzw_rpc.Status {
    // Gets the old values as numbers.
    old_src_value := tkrzw_rpc.ToInt(dbm.GetStrSimple(src_key, "0"))
    old_dest_value := tkrzw_rpc.ToInt(dbm.GetStrSimple(dest_key, "0"))

    // Calculates the new values.
    new_src_value := old_src_value - amount
    new_dest_value := old_dest_value + amount
    if new_src_value < 0 {
      return tkrzw_rpc.NewStatus(tkrzw_rpc.StatusApplicationError, "insufficient value")
    }

    // Prepares the pre-condition and the post-condition of the transaction.
    old_records := []tkrzw_rpc.KeyValueStrPair{
      {src_key, tkrzw_rpc.ToString(old_src_value)},
      {dest_key, tkrzw_rpc.ToString(old_dest_value)},
    }
    new_records := []tkrzw_rpc.KeyValueStrPair{
      {src_key, tkrzw_rpc.ToString(new_src_value)},
      {dest_key, tkrzw_rpc.ToString(new_dest_value)},
    }

    // Performs the transaction atomically.
    // This fails safely if other concurrent transactions break the pre-condition.
    return dbm.CompareExchangeMultiStr(old_records, new_records)
  }

  // Tries a transaction until it succeeds
  var status *tkrzw_rpc.Status
  for num_tries := 0; num_tries < 100; num_tries++ {
    status = transfer("Alice", "Bob", 500)
    if !status.Equals(tkrzw_rpc.StatusInfeasibleError) {
      break
    }
  }
  status.OrDie()

  // Traverses records in a primitive way.
  iter := dbm.MakeIterator()
  defer iter.Destruct()
  iter.First()
  for {
    key, value, status := iter.GetStr()
    if !status.IsOK() {
      break
    }
    fmt.Println(key, value)
    iter.Next()
  }
}

Index

Constants

View Source
const (
	// Success.
	StatusSuccess = StatusCode(0)
	// Generic error whose cause is unknown.
	StatusUnknownError = StatusCode(1)
	// Generic error from underlying systems.
	StatusSystemError = StatusCode(2)
	// Error that the feature is not implemented.
	StatusNotImplementedError = StatusCode(3)
	// Error that a precondition is not met.
	StatusPreconditionError = StatusCode(4)
	// Error that a given argument is invalid.
	StatusInvalidArgumentError = StatusCode(5)
	// Error that the operation is canceled.
	StatusCanceledError = StatusCode(6)
	// Error that a specific resource is not found.
	StatusNotFoundError = StatusCode(7)
	// Error that the operation is not permitted.
	StatusPermissionError = StatusCode(8)
	// Error that the operation is infeasible.
	StatusInfeasibleError = StatusCode(9)
	// Error that a specific resource is duplicated.
	StatusDuplicationError = StatusCode(10)
	// Error that internal data are broken.
	StatusBrokenDataError = StatusCode(11)
	// Error caused by networking failure.
	StatusNetworkError = StatusCode(12)
	// Generic error caused by the application logic.
	StatusApplicationError = StatusCode(13)
)

Enumeration of status codes.

Variables

View Source
var AnyBytes = []byte("\x00[ANY]\x00")

The special bytes value for no-operation or any data.

View Source
var AnyString = string([]byte("\x00[ANY]\x00"))

The special string value for no-operation or any data.

View Source
var DBMService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "tkrzw_rpc.DBMService",
	HandlerType: (*DBMServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Echo",
			Handler:    _DBMService_Echo_Handler,
		},
		{
			MethodName: "Inspect",
			Handler:    _DBMService_Inspect_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _DBMService_Get_Handler,
		},
		{
			MethodName: "GetMulti",
			Handler:    _DBMService_GetMulti_Handler,
		},
		{
			MethodName: "Set",
			Handler:    _DBMService_Set_Handler,
		},
		{
			MethodName: "SetMulti",
			Handler:    _DBMService_SetMulti_Handler,
		},
		{
			MethodName: "Remove",
			Handler:    _DBMService_Remove_Handler,
		},
		{
			MethodName: "RemoveMulti",
			Handler:    _DBMService_RemoveMulti_Handler,
		},
		{
			MethodName: "Append",
			Handler:    _DBMService_Append_Handler,
		},
		{
			MethodName: "AppendMulti",
			Handler:    _DBMService_AppendMulti_Handler,
		},
		{
			MethodName: "CompareExchange",
			Handler:    _DBMService_CompareExchange_Handler,
		},
		{
			MethodName: "Increment",
			Handler:    _DBMService_Increment_Handler,
		},
		{
			MethodName: "CompareExchangeMulti",
			Handler:    _DBMService_CompareExchangeMulti_Handler,
		},
		{
			MethodName: "Rekey",
			Handler:    _DBMService_Rekey_Handler,
		},
		{
			MethodName: "PopFirst",
			Handler:    _DBMService_PopFirst_Handler,
		},
		{
			MethodName: "PushLast",
			Handler:    _DBMService_PushLast_Handler,
		},
		{
			MethodName: "Count",
			Handler:    _DBMService_Count_Handler,
		},
		{
			MethodName: "GetFileSize",
			Handler:    _DBMService_GetFileSize_Handler,
		},
		{
			MethodName: "Clear",
			Handler:    _DBMService_Clear_Handler,
		},
		{
			MethodName: "Rebuild",
			Handler:    _DBMService_Rebuild_Handler,
		},
		{
			MethodName: "ShouldBeRebuilt",
			Handler:    _DBMService_ShouldBeRebuilt_Handler,
		},
		{
			MethodName: "Synchronize",
			Handler:    _DBMService_Synchronize_Handler,
		},
		{
			MethodName: "Search",
			Handler:    _DBMService_Search_Handler,
		},
		{
			MethodName: "ChangeMaster",
			Handler:    _DBMService_ChangeMaster_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Stream",
			Handler:       _DBMService_Stream_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
		{
			StreamName:    "Iterate",
			Handler:       _DBMService_Iterate_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
		{
			StreamName:    "Replicate",
			Handler:       _DBMService_Replicate_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "tkrzw_rpc.proto",
}

DBMService_ServiceDesc is the grpc.ServiceDesc for DBMService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var IterateRequest_OpType_name = map[int32]string{
	0:  "OP_NONE",
	1:  "OP_FIRST",
	2:  "OP_LAST",
	3:  "OP_JUMP",
	4:  "OP_JUMP_LOWER",
	5:  "OP_JUMP_UPPER",
	6:  "OP_NEXT",
	7:  "OP_PREVIOUS",
	8:  "OP_GET",
	9:  "OP_SET",
	10: "OP_REMOVE",
	11: "OP_STEP",
}
View Source
var IterateRequest_OpType_value = map[string]int32{
	"OP_NONE":       0,
	"OP_FIRST":      1,
	"OP_LAST":       2,
	"OP_JUMP":       3,
	"OP_JUMP_LOWER": 4,
	"OP_JUMP_UPPER": 5,
	"OP_NEXT":       6,
	"OP_PREVIOUS":   7,
	"OP_GET":        8,
	"OP_SET":        9,
	"OP_REMOVE":     10,
	"OP_STEP":       11,
}
View Source
var NilString = string([]byte("\x00[NIL]\x00"))

The special string value for non-existing data.

View Source
var ReplicateResponse_OpType_name = map[int32]string{
	0: "OP_NOOP",
	1: "OP_SET",
	2: "OP_REMOVE",
	3: "OP_CLEAR",
}
View Source
var ReplicateResponse_OpType_value = map[string]int32{
	"OP_NOOP":   0,
	"OP_SET":    1,
	"OP_REMOVE": 2,
	"OP_CLEAR":  3,
}

Functions

func IsAnyBytes

func IsAnyBytes(data []byte) bool

Checks whether the given bytes are the any bytes.

@param data The data to check. @return True if the data are the any bytes.

func IsAnyData

func IsAnyData(data interface{}) bool

Checks whether the given data is a unique value of any data.

@param data The data to check. @return True if the data is any data or, false if not.

func IsAnyString

func IsAnyString(data string) bool

Checks whether the given string is the any string.

@param data The data to check. @return True if the data is the string, or false if not.

func IsNilData

func IsNilData(data interface{}) bool

Checks whether the given data is a nil-equivalent value.

@param data The data to check. @return True if the data is a nil-equivalent value, or false if not.

func IsNilString

func IsNilString(data string) bool

Checks whether the given string is the nil string.

@param data The data to check. @return True if the data is the nil string, or false if not.

func ParseParams

func ParseParams(expr string) map[string]string

Parses a parameter string to make a parameter string map.

@param expr A parameter string in "name=value,name=value,..." format. @return The string map of the parameters.

func RegisterDBMServiceServer

func RegisterDBMServiceServer(s grpc.ServiceRegistrar, srv DBMServiceServer)

func StatusCodeName

func StatusCodeName(code StatusCode) string

Gets the name of a status code.

@param code The status code. @return The name of the status code.

func ToByteArray

func ToByteArray(x interface{}) []byte

Converts any object into a byte array.

@param x The object to convert. @return The result byte array.

func ToFloat

func ToFloat(value interface{}) float64

Converts any object into a real number.

@param x The object to convert. @return The result real number.

func ToInt

func ToInt(value interface{}) int64

Converts any object into an integer.

@param x The object to convert. @return The result integer.

func ToString

func ToString(x interface{}) string

Converts any object into a string.

@param x The object to convert. @return The result string.

Types

type AppendMultiRequest

type AppendMultiRequest struct {
	// The index of the DBM object.  The origin is 0.
	DbmIndex int32 `protobuf:"varint,1,opt,name=dbm_index,json=dbmIndex,proto3" json:"dbm_index,omitempty"`
	// Records to store.
	Records []*BytesPair `protobuf:"bytes,2,rep,name=records,proto3" json:"records,omitempty"`
	// The delimiter to put after the existing record.
	Delim                []byte   `protobuf:"bytes,3,opt,name=delim,proto3" json:"delim,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request of the AppendMulti method.

func (*AppendMultiRequest) Descriptor

func (*AppendMultiRequest) Descriptor() ([]byte, []int)

func (*AppendMultiRequest) GetDbmIndex

func (m *AppendMultiRequest) GetDbmIndex() int32

func (*AppendMultiRequest) GetDelim

func (m *AppendMultiRequest) GetDelim() []byte

func (*AppendMultiRequest) GetRecords

func (m *AppendMultiRequest) GetRecords() []*BytesPair

func (*AppendMultiRequest) ProtoMessage

func (*AppendMultiRequest) ProtoMessage()

func (*AppendMultiRequest) Reset

func (m *AppendMultiRequest) Reset()

func (*AppendMultiRequest) String

func (m *AppendMultiRequest) String() string

func (*AppendMultiRequest) XXX_DiscardUnknown

func (m *AppendMultiRequest) XXX_DiscardUnknown()

func (*AppendMultiRequest) XXX_Marshal

func (m *AppendMultiRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AppendMultiRequest) XXX_Merge

func (m *AppendMultiRequest) XXX_Merge(src proto.Message)

func (*AppendMultiRequest) XXX_Size

func (m *AppendMultiRequest) XXX_Size() int

func (*AppendMultiRequest) XXX_Unmarshal

func (m *AppendMultiRequest) XXX_Unmarshal(b []byte) error

type AppendMultiResponse

type AppendMultiResponse struct {
	// The result status.
	Status               *StatusProto `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

Response of the AppendMulti method.

func (*AppendMultiResponse) Descriptor

func (*AppendMultiResponse) Descriptor() ([]byte, []int)

func (*AppendMultiResponse) GetStatus

func (m *AppendMultiResponse) GetStatus() *StatusProto

func (*AppendMultiResponse) ProtoMessage

func (*AppendMultiResponse) ProtoMessage()

func (*AppendMultiResponse) Reset

func (m *AppendMultiResponse) Reset()

func (*AppendMultiResponse) String

func (m *AppendMultiResponse) String() string

func (*AppendMultiResponse) XXX_DiscardUnknown

func (m *AppendMultiResponse) XXX_DiscardUnknown()

func (*AppendMultiResponse) XXX_Marshal

func (m *AppendMultiResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AppendMultiResponse) XXX_Merge

func (m *AppendMultiResponse) XXX_Merge(src proto.Message)

func (*AppendMultiResponse) XXX_Size

func (m *AppendMultiResponse) XXX_Size() int

func (*AppendMultiResponse) XXX_Unmarshal

func (m *AppendMultiResponse) XXX_Unmarshal(b []byte) error

type AppendRequest

type AppendRequest struct {
	// The index of the DBM object.  The origin is 0.
	DbmIndex int32 `protobuf:"varint,1,opt,name=dbm_index,json=dbmIndex,proto3" json:"dbm_index,omitempty"`
	// The key of the record.
	Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	// The value of the record.
	Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	// The delimiter to put after the existing record.
	Delim                []byte   `protobuf:"bytes,4,opt,name=delim,proto3" json:"delim,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request of the Append method.

func (*AppendRequest) Descriptor

func (*AppendRequest) Descriptor() ([]byte, []int)

func (*AppendRequest) GetDbmIndex

func (m *AppendRequest) GetDbmIndex() int32

func (*AppendRequest) GetDelim

func (m *AppendRequest) GetDelim() []byte

func (*AppendRequest) GetKey

func (m *AppendRequest) GetKey() []byte

func (*AppendRequest) GetValue

func (m *AppendRequest) GetValue() []byte

func (*AppendRequest) ProtoMessage

func (*AppendRequest) ProtoMessage()

func (*AppendRequest) Reset

func (m *AppendRequest) Reset()

func (*AppendRequest) String

func (m *AppendRequest) String() string

func (*AppendRequest) XXX_DiscardUnknown

func (m *AppendRequest) XXX_DiscardUnknown()

func (*AppendRequest) XXX_Marshal

func (m *AppendRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AppendRequest) XXX_Merge

func (m *AppendRequest) XXX_Merge(src proto.Message)

func (*AppendRequest) XXX_Size

func (m *AppendRequest) XXX_Size() int

func (*AppendRequest) XXX_Unmarshal

func (m *AppendRequest) XXX_Unmarshal(b []byte) error

type AppendResponse

type AppendResponse struct {
	// The result status.
	Status               *StatusProto `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

Response of the Append method.

func (*AppendResponse) Descriptor

func (*AppendResponse) Descriptor() ([]byte, []int)

func (*AppendResponse) GetStatus

func (m *AppendResponse) GetStatus() *StatusProto

func (*AppendResponse) ProtoMessage

func (*AppendResponse) ProtoMessage()

func (*AppendResponse) Reset

func (m *AppendResponse) Reset()

func (*AppendResponse) String

func (m *AppendResponse) String() string

func (*AppendResponse) XXX_DiscardUnknown

func (m *AppendResponse) XXX_DiscardUnknown()

func (*AppendResponse) XXX_Marshal

func (m *AppendResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AppendResponse) XXX_Merge

func (m *AppendResponse) XXX_Merge(src proto.Message)

func (*AppendResponse) XXX_Size

func (m *AppendResponse) XXX_Size() int

func (*AppendResponse) XXX_Unmarshal

func (m *AppendResponse) XXX_Unmarshal(b []byte) error

type BytesPair

type BytesPair struct {
	// The first value, aka. record key.
	First []byte `protobuf:"bytes,1,opt,name=first,proto3" json:"first,omitempty"`
	// The second value aka. record value.
	Second               []byte   `protobuf:"bytes,2,opt,name=second,proto3" json:"second,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Generic key-value pair of byte arrays.

func (*BytesPair) Descriptor

func (*BytesPair) Descriptor() ([]byte, []int)

func (*BytesPair) GetFirst

func (m *BytesPair) GetFirst() []byte

func (*BytesPair) GetSecond

func (m *BytesPair) GetSecond() []byte

func (*BytesPair) ProtoMessage

func (*BytesPair) ProtoMessage()

func (*BytesPair) Reset

func (m *BytesPair) Reset()

func (*BytesPair) String

func (m *BytesPair) String() string

func (*BytesPair) XXX_DiscardUnknown

func (m *BytesPair) XXX_DiscardUnknown()

func (*BytesPair) XXX_Marshal

func (m *BytesPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BytesPair) XXX_Merge

func (m *BytesPair) XXX_Merge(src proto.Message)

func (*BytesPair) XXX_Size

func (m *BytesPair) XXX_Size() int

func (*BytesPair) XXX_Unmarshal

func (m *BytesPair) XXX_Unmarshal(b []byte) error

type ChangeMasterRequest

type ChangeMasterRequest struct {
	// The address of the master of replication.
	Master string `protobuf:"bytes,1,opt,name=master,proto3" json:"master,omitempty"`
	// The skew of the timestamp.
	TimestampSkew        int64    `protobuf:"varint,2,opt,name=timestamp_skew,json=timestampSkew,proto3" json:"timestamp_skew,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request of the ChangeMaster method.

func (*ChangeMasterRequest) Descriptor

func (*ChangeMasterRequest) Descriptor() ([]byte, []int)

func (*ChangeMasterRequest) GetMaster

func (m *ChangeMasterRequest) GetMaster() string

func (*ChangeMasterRequest) GetTimestampSkew

func (m *ChangeMasterRequest) GetTimestampSkew() int64

func (*ChangeMasterRequest) ProtoMessage

func (*ChangeMasterRequest) ProtoMessage()

func (*ChangeMasterRequest) Reset

func (m *ChangeMasterRequest) Reset()

func (*ChangeMasterRequest) String

func (m *ChangeMasterRequest) String() string

func (*ChangeMasterRequest) XXX_DiscardUnknown

func (m *ChangeMasterRequest) XXX_DiscardUnknown()

func (*ChangeMasterRequest) XXX_Marshal

func (m *ChangeMasterRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ChangeMasterRequest) XXX_Merge

func (m *ChangeMasterRequest) XXX_Merge(src proto.Message)

func (*ChangeMasterRequest) XXX_Size

func (m *ChangeMasterRequest) XXX_Size() int

func (*ChangeMasterRequest) XXX_Unmarshal

func (m *ChangeMasterRequest) XXX_Unmarshal(b []byte) error

type ChangeMasterResponse

type ChangeMasterResponse struct {
	// The result status.
	Status               *StatusProto `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

Response of the ChangeMaster method.

func (*ChangeMasterResponse) Descriptor

func (*ChangeMasterResponse) Descriptor() ([]byte, []int)

func (*ChangeMasterResponse) GetStatus

func (m *ChangeMasterResponse) GetStatus() *StatusProto

func (*ChangeMasterResponse) ProtoMessage

func (*ChangeMasterResponse) ProtoMessage()

func (*ChangeMasterResponse) Reset

func (m *ChangeMasterResponse) Reset()

func (*ChangeMasterResponse) String

func (m *ChangeMasterResponse) String() string

func (*ChangeMasterResponse) XXX_DiscardUnknown

func (m *ChangeMasterResponse) XXX_DiscardUnknown()

func (*ChangeMasterResponse) XXX_Marshal

func (m *ChangeMasterResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ChangeMasterResponse) XXX_Merge

func (m *ChangeMasterResponse) XXX_Merge(src proto.Message)

func (*ChangeMasterResponse) XXX_Size

func (m *ChangeMasterResponse) XXX_Size() int

func (*ChangeMasterResponse) XXX_Unmarshal

func (m *ChangeMasterResponse) XXX_Unmarshal(b []byte) error

type ClearRequest

type ClearRequest struct {
	// The index of the DBM object.  The origin is 0.
	DbmIndex             int32    `protobuf:"varint,1,opt,name=dbm_index,json=dbmIndex,proto3" json:"dbm_index,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request of the Clear method.

func (*ClearRequest) Descriptor

func (*ClearRequest) Descriptor() ([]byte, []int)

func (*ClearRequest) GetDbmIndex

func (m *ClearRequest) GetDbmIndex() int32

func (*ClearRequest) ProtoMessage

func (*ClearRequest) ProtoMessage()

func (*ClearRequest) Reset

func (m *ClearRequest) Reset()

func (*ClearRequest) String

func (m *ClearRequest) String() string

func (*ClearRequest) XXX_DiscardUnknown

func (m *ClearRequest) XXX_DiscardUnknown()

func (*ClearRequest) XXX_Marshal

func (m *ClearRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ClearRequest) XXX_Merge

func (m *ClearRequest) XXX_Merge(src proto.Message)

func (*ClearRequest) XXX_Size

func (m *ClearRequest) XXX_Size() int

func (*ClearRequest) XXX_Unmarshal

func (m *ClearRequest) XXX_Unmarshal(b []byte) error

type ClearResponse

type ClearResponse struct {
	// The result status.
	Status               *StatusProto `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

Response of the Clear method.

func (*ClearResponse) Descriptor

func (*ClearResponse) Descriptor() ([]byte, []int)

func (*ClearResponse) GetStatus

func (m *ClearResponse) GetStatus() *StatusProto

func (*ClearResponse) ProtoMessage

func (*ClearResponse) ProtoMessage()

func (*ClearResponse) Reset

func (m *ClearResponse) Reset()

func (*ClearResponse) String

func (m *ClearResponse) String() string

func (*ClearResponse) XXX_DiscardUnknown

func (m *ClearResponse) XXX_DiscardUnknown()

func (*ClearResponse) XXX_Marshal

func (m *ClearResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ClearResponse) XXX_Merge

func (m *ClearResponse) XXX_Merge(src proto.Message)

func (*ClearResponse) XXX_Size

func (m *ClearResponse) XXX_Size() int

func (*ClearResponse) XXX_Unmarshal

func (m *ClearResponse) XXX_Unmarshal(b []byte) error

type CompareExchangeMultiRequest

type CompareExchangeMultiRequest struct {
	// The index of the DBM object.  The origin is 0.
	DbmIndex int32 `protobuf:"varint,1,opt,name=dbm_index,json=dbmIndex,proto3" json:"dbm_index,omitempty"`
	// Expected record states.
	Expected []*RecordState `protobuf:"bytes,2,rep,name=expected,proto3" json:"expected,omitempty"`
	// Desired record states.
	Desired              []*RecordState `protobuf:"bytes,3,rep,name=desired,proto3" json:"desired,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

Request of the CompareExchangeMulti method.

func (*CompareExchangeMultiRequest) Descriptor

func (*CompareExchangeMultiRequest) Descriptor() ([]byte, []int)

func (*CompareExchangeMultiRequest) GetDbmIndex

func (m *CompareExchangeMultiRequest) GetDbmIndex() int32

func (*CompareExchangeMultiRequest) GetDesired

func (m *CompareExchangeMultiRequest) GetDesired() []*RecordState

func (*CompareExchangeMultiRequest) GetExpected

func (m *CompareExchangeMultiRequest) GetExpected() []*RecordState

func (*CompareExchangeMultiRequest) ProtoMessage

func (*CompareExchangeMultiRequest) ProtoMessage()

func (*CompareExchangeMultiRequest) Reset

func (m *CompareExchangeMultiRequest) Reset()

func (*CompareExchangeMultiRequest) String

func (m *CompareExchangeMultiRequest) String() string

func (*CompareExchangeMultiRequest) XXX_DiscardUnknown

func (m *CompareExchangeMultiRequest) XXX_DiscardUnknown()

func (*CompareExchangeMultiRequest) XXX_Marshal

func (m *CompareExchangeMultiRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CompareExchangeMultiRequest) XXX_Merge

func (m *CompareExchangeMultiRequest) XXX_Merge(src proto.Message)

func (*CompareExchangeMultiRequest) XXX_Size

func (m *CompareExchangeMultiRequest) XXX_Size() int

func (*CompareExchangeMultiRequest) XXX_Unmarshal

func (m *CompareExchangeMultiRequest) XXX_Unmarshal(b []byte) error

type CompareExchangeMultiResponse

type CompareExchangeMultiResponse struct {
	// The result status.
	Status               *StatusProto `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

Response of the CompareExchangeMulti method.

func (*CompareExchangeMultiResponse) Descriptor

func (*CompareExchangeMultiResponse) Descriptor() ([]byte, []int)

func (*CompareExchangeMultiResponse) GetStatus

func (m *CompareExchangeMultiResponse) GetStatus() *StatusProto

func (*CompareExchangeMultiResponse) ProtoMessage

func (*CompareExchangeMultiResponse) ProtoMessage()

func (*CompareExchangeMultiResponse) Reset

func (m *CompareExchangeMultiResponse) Reset()

func (*CompareExchangeMultiResponse) String

func (*CompareExchangeMultiResponse) XXX_DiscardUnknown

func (m *CompareExchangeMultiResponse) XXX_DiscardUnknown()

func (*CompareExchangeMultiResponse) XXX_Marshal

func (m *CompareExchangeMultiResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CompareExchangeMultiResponse) XXX_Merge

func (m *CompareExchangeMultiResponse) XXX_Merge(src proto.Message)

func (*CompareExchangeMultiResponse) XXX_Size

func (m *CompareExchangeMultiResponse) XXX_Size() int

func (*CompareExchangeMultiResponse) XXX_Unmarshal

func (m *CompareExchangeMultiResponse) XXX_Unmarshal(b []byte) error

type CompareExchangeRequest

type CompareExchangeRequest struct {
	// The index of the DBM object.  The origin is 0.
	DbmIndex int32 `protobuf:"varint,1,opt,name=dbm_index,json=dbmIndex,proto3" json:"dbm_index,omitempty"`
	// The key of the record.
	Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	// Whether the record is expected to exist.
	ExpectedExistence bool `protobuf:"varint,3,opt,name=expected_existence,json=expectedExistence,proto3" json:"expected_existence,omitempty"`
	// The expected value.
	ExpectedValue []byte `protobuf:"bytes,4,opt,name=expected_value,json=expectedValue,proto3" json:"expected_value,omitempty"`
	// True to expect any value.
	ExpectAnyValue bool `protobuf:"varint,5,opt,name=expect_any_value,json=expectAnyValue,proto3" json:"expect_any_value,omitempty"`
	// Whether the record is desired to exists.
	DesiredExistence bool `protobuf:"varint,6,opt,name=desired_existence,json=desiredExistence,proto3" json:"desired_existence,omitempty"`
	// The desired value.
	DesiredValue []byte `protobuf:"bytes,7,opt,name=desired_value,json=desiredValue,proto3" json:"desired_value,omitempty"`
	// True to do no update.
	DesireNoUpdate bool `protobuf:"varint,8,opt,name=desire_no_update,json=desireNoUpdate,proto3" json:"desire_no_update,omitempty"`
	// True to get the actual value of the existing record.
	GetActual bool `protobuf:"varint,9,opt,name=get_actual,json=getActual,proto3" json:"get_actual,omitempty"`
	// The wait time in seconds before retrying.
	RetryWait float64 `protobuf:"fixed64,10,opt,name=retry_wait,json=retryWait,proto3" json:"retry_wait,omitempty"`
	// True to send a signal to wake up retrying threads.
	Notify               bool     `protobuf:"varint,11,opt,name=notify,proto3" json:"notify,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request of the CompareExchange method.

func (*CompareExchangeRequest) Descriptor

func (*CompareExchangeRequest) Descriptor() ([]byte, []int)

func (*CompareExchangeRequest) GetDbmIndex

func (m *CompareExchangeRequest) GetDbmIndex() int32

func (*CompareExchangeRequest) GetDesireNoUpdate

func (m *CompareExchangeRequest) GetDesireNoUpdate() bool

func (*CompareExchangeRequest) GetDesiredExistence

func (m *CompareExchangeRequest) GetDesiredExistence() bool

func (*CompareExchangeRequest) GetDesiredValue

func (m *CompareExchangeRequest) GetDesiredValue() []byte

func (*CompareExchangeRequest) GetExpectAnyValue

func (m *CompareExchangeRequest) GetExpectAnyValue() bool

func (*CompareExchangeRequest) GetExpectedExistence

func (m *CompareExchangeRequest) GetExpectedExistence() bool

func (*CompareExchangeRequest) GetExpectedValue

func (m *CompareExchangeRequest) GetExpectedValue() []byte

func (*CompareExchangeRequest) GetGetActual

func (m *CompareExchangeRequest) GetGetActual() bool

func (*CompareExchangeRequest) GetKey

func (m *CompareExchangeRequest) GetKey() []byte

func (*CompareExchangeRequest) GetNotify

func (m *CompareExchangeRequest) GetNotify() bool

func (*CompareExchangeRequest) GetRetryWait

func (m *CompareExchangeRequest) GetRetryWait() float64

func (*CompareExchangeRequest) ProtoMessage

func (*CompareExchangeRequest) ProtoMessage()

func (*CompareExchangeRequest) Reset

func (m *CompareExchangeRequest) Reset()

func (*CompareExchangeRequest) String

func (m *CompareExchangeRequest) String() string

func (*CompareExchangeRequest) XXX_DiscardUnknown

func (m *CompareExchangeRequest) XXX_DiscardUnknown()

func (*CompareExchangeRequest) XXX_Marshal

func (m *CompareExchangeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CompareExchangeRequest) XXX_Merge

func (m *CompareExchangeRequest) XXX_Merge(src proto.Message)

func (*CompareExchangeRequest) XXX_Size

func (m *CompareExchangeRequest) XXX_Size() int

func (*CompareExchangeRequest) XXX_Unmarshal

func (m *CompareExchangeRequest) XXX_Unmarshal(b []byte) error

type CompareExchangeResponse

type CompareExchangeResponse struct {
	// The result status.
	Status *StatusProto `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// The actual value of the existing record.
	Actual []byte `protobuf:"bytes,2,opt,name=actual,proto3" json:"actual,omitempty"`
	// Whether there is an existing record.
	Found                bool     `protobuf:"varint,3,opt,name=found,proto3" json:"found,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Response of the CompareExchange method.

func (*CompareExchangeResponse) Descriptor

func (*CompareExchangeResponse) Descriptor() ([]byte, []int)

func (*CompareExchangeResponse) GetActual

func (m *CompareExchangeResponse) GetActual() []byte

func (*CompareExchangeResponse) GetFound

func (m *CompareExchangeResponse) GetFound() bool

func (*CompareExchangeResponse) GetStatus

func (m *CompareExchangeResponse) GetStatus() *StatusProto

func (*CompareExchangeResponse) ProtoMessage

func (*CompareExchangeResponse) ProtoMessage()

func (*CompareExchangeResponse) Reset

func (m *CompareExchangeResponse) Reset()

func (*CompareExchangeResponse) String

func (m *CompareExchangeResponse) String() string

func (*CompareExchangeResponse) XXX_DiscardUnknown

func (m *CompareExchangeResponse) XXX_DiscardUnknown()

func (*CompareExchangeResponse) XXX_Marshal

func (m *CompareExchangeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CompareExchangeResponse) XXX_Merge

func (m *CompareExchangeResponse) XXX_Merge(src proto.Message)

func (*CompareExchangeResponse) XXX_Size

func (m *CompareExchangeResponse) XXX_Size() int

func (*CompareExchangeResponse) XXX_Unmarshal

func (m *CompareExchangeResponse) XXX_Unmarshal(b []byte) error

type CountRequest

type CountRequest struct {
	// The index of the DBM object.  The origin is 0.
	DbmIndex             int32    `protobuf:"varint,1,opt,name=dbm_index,json=dbmIndex,proto3" json:"dbm_index,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request of the Count method.

func (*CountRequest) Descriptor

func (*CountRequest) Descriptor() ([]byte, []int)

func (*CountRequest) GetDbmIndex

func (m *CountRequest) GetDbmIndex() int32

func (*CountRequest) ProtoMessage

func (*CountRequest) ProtoMessage()

func (*CountRequest) Reset

func (m *CountRequest) Reset()

func (*CountRequest) String

func (m *CountRequest) String() string

func (*CountRequest) XXX_DiscardUnknown

func (m *CountRequest) XXX_DiscardUnknown()

func (*CountRequest) XXX_Marshal

func (m *CountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CountRequest) XXX_Merge

func (m *CountRequest) XXX_Merge(src proto.Message)

func (*CountRequest) XXX_Size

func (m *CountRequest) XXX_Size() int

func (*CountRequest) XXX_Unmarshal

func (m *CountRequest) XXX_Unmarshal(b []byte) error

type CountResponse

type CountResponse struct {
	// The result status.
	Status *StatusProto `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// The number of records.
	Count                int64    `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Response of the Count method.

func (*CountResponse) Descriptor

func (*CountResponse) Descriptor() ([]byte, []int)

func (*CountResponse) GetCount

func (m *CountResponse) GetCount() int64

func (*CountResponse) GetStatus

func (m *CountResponse) GetStatus() *StatusProto

func (*CountResponse) ProtoMessage

func (*CountResponse) ProtoMessage()

func (*CountResponse) Reset

func (m *CountResponse) Reset()

func (*CountResponse) String

func (m *CountResponse) String() string

func (*CountResponse) XXX_DiscardUnknown

func (m *CountResponse) XXX_DiscardUnknown()

func (*CountResponse) XXX_Marshal

func (m *CountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CountResponse) XXX_Merge

func (m *CountResponse) XXX_Merge(src proto.Message)

func (*CountResponse) XXX_Size

func (m *CountResponse) XXX_Size() int

func (*CountResponse) XXX_Unmarshal

func (m *CountResponse) XXX_Unmarshal(b []byte) error

type DBMServiceClient

type DBMServiceClient interface {
	Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error)
	Inspect(ctx context.Context, in *InspectRequest, opts ...grpc.CallOption) (*InspectResponse, error)
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
	GetMulti(ctx context.Context, in *GetMultiRequest, opts ...grpc.CallOption) (*GetMultiResponse, error)
	Set(ctx context.Context, in *SetRequest, opts ...grpc.CallOption) (*SetResponse, error)
	SetMulti(ctx context.Context, in *SetMultiRequest, opts ...grpc.CallOption) (*SetMultiResponse, error)
	Remove(ctx context.Context, in *RemoveRequest, opts ...grpc.CallOption) (*RemoveResponse, error)
	RemoveMulti(ctx context.Context, in *RemoveMultiRequest, opts ...grpc.CallOption) (*RemoveMultiResponse, error)
	Append(ctx context.Context, in *AppendRequest, opts ...grpc.CallOption) (*AppendResponse, error)
	AppendMulti(ctx context.Context, in *AppendMultiRequest, opts ...grpc.CallOption) (*AppendMultiResponse, error)
	CompareExchange(ctx context.Context, in *CompareExchangeRequest, opts ...grpc.CallOption) (*CompareExchangeResponse, error)
	Increment(ctx context.Context, in *IncrementRequest, opts ...grpc.CallOption) (*IncrementResponse, error)
	CompareExchangeMulti(ctx context.Context, in *CompareExchangeMultiRequest, opts ...grpc.CallOption) (*CompareExchangeMultiResponse, error)
	Rekey(ctx context.Context, in *RekeyRequest, opts ...grpc.CallOption) (*RekeyResponse, error)
	PopFirst(ctx context.Context, in *PopFirstRequest, opts ...grpc.CallOption) (*PopFirstResponse, error)
	PushLast(ctx context.Context, in *PushLastRequest, opts ...grpc.CallOption) (*PushLastResponse, error)
	Count(ctx context.Context, in *CountRequest, opts ...grpc.CallOption) (*CountResponse, error)
	GetFileSize(ctx context.Context, in *GetFileSizeRequest, opts ...grpc.CallOption) (*GetFileSizeResponse, error)
	Clear(ctx context.Context, in *ClearRequest, opts ...grpc.CallOption) (*ClearResponse, error)
	Rebuild(ctx context.Context, in *RebuildRequest, opts ...grpc.CallOption) (*RebuildResponse, error)
	ShouldBeRebuilt(ctx context.Context, in *ShouldBeRebuiltRequest, opts ...grpc.CallOption) (*ShouldBeRebuiltResponse, error)
	Synchronize(ctx context.Context, in *SynchronizeRequest, opts ...grpc.CallOption) (*SynchronizeResponse, error)
	Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error)
	Stream(ctx context.Context, opts ...grpc.CallOption) (DBMService_StreamClient, error)
	Iterate(ctx context.Context, opts ...grpc.CallOption) (DBMService_IterateClient, error)
	Replicate(ctx context.Context, in *ReplicateRequest, opts ...grpc.CallOption) (DBMService_ReplicateClient, error)
	ChangeMaster(ctx context.Context, in *ChangeMasterRequest, opts ...grpc.CallOption) (*ChangeMasterResponse, error)
}

DBMServiceClient is the client API for DBMService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewDBMServiceClient

func NewDBMServiceClient(cc grpc.ClientConnInterface) DBMServiceClient

type DBMServiceServer

type DBMServiceServer interface {
	Echo(context.Context, *EchoRequest) (*EchoResponse, error)
	Inspect(context.Context, *InspectRequest) (*InspectResponse, error)
	Get(context.Context, *GetRequest) (*GetResponse, error)
	GetMulti(context.Context, *GetMultiRequest) (*GetMultiResponse, error)
	Set(context.Context, *SetRequest) (*SetResponse, error)
	SetMulti(context.Context, *SetMultiRequest) (*SetMultiResponse, error)
	Remove(context.Context, *RemoveRequest) (*RemoveResponse, error)
	RemoveMulti(context.Context, *RemoveMultiRequest) (*RemoveMultiResponse, error)
	Append(context.Context, *AppendRequest) (*AppendResponse, error)
	AppendMulti(context.Context, *AppendMultiRequest) (*AppendMultiResponse, error)
	CompareExchange(context.Context, *CompareExchangeRequest) (*CompareExchangeResponse, error)
	Increment(context.Context, *IncrementRequest) (*IncrementResponse, error)
	CompareExchangeMulti(context.Context, *CompareExchangeMultiRequest) (*CompareExchangeMultiResponse, error)
	Rekey(context.Context, *RekeyRequest) (*RekeyResponse, error)
	PopFirst(context.Context, *PopFirstRequest) (*PopFirstResponse, error)
	PushLast(context.Context, *PushLastRequest) (*PushLastResponse, error)
	Count(context.Context, *CountRequest) (*CountResponse, error)
	GetFileSize(context.Context, *GetFileSizeRequest) (*GetFileSizeResponse, error)
	Clear(context.Context, *ClearRequest) (*ClearResponse, error)
	Rebuild(context.Context, *RebuildRequest) (*RebuildResponse, error)
	ShouldBeRebuilt(context.Context, *ShouldBeRebuiltRequest) (*ShouldBeRebuiltResponse, error)
	Synchronize(context.Context, *SynchronizeRequest) (*SynchronizeResponse, error)
	Search(context.Context, *SearchRequest) (*SearchResponse, error)
	Stream(DBMService_StreamServer) error
	Iterate(DBMService_IterateServer) error
	Replicate(*ReplicateRequest, DBMService_ReplicateServer) error
	ChangeMaster(context.Context, *ChangeMasterRequest) (*ChangeMasterResponse, error)
	// contains filtered or unexported methods
}

DBMServiceServer is the server API for DBMService service. All implementations must embed UnimplementedDBMServiceServer for forward compatibility

type DBMService_IterateClient

type DBMService_IterateClient interface {
	Send(*IterateRequest) error
	Recv() (*IterateResponse, error)
	grpc.ClientStream
}

type DBMService_IterateServer

type DBMService_IterateServer interface {
	Send(*IterateResponse) error
	Recv() (*IterateRequest, error)
	grpc.ServerStream
}

type DBMService_ReplicateClient

type DBMService_ReplicateClient interface {
	Recv() (*ReplicateResponse, error)
	grpc.ClientStream
}

type DBMService_ReplicateServer

type DBMService_ReplicateServer interface {
	Send(*ReplicateResponse) error
	grpc.ServerStream
}

type DBMService_StreamClient

type DBMService_StreamClient interface {
	Send(*StreamRequest) error
	Recv() (*StreamResponse, error)
	grpc.ClientStream
}

type DBMService_StreamServer

type DBMService_StreamServer interface {
	Send(*StreamResponse) error
	Recv() (*StreamRequest, error)
	grpc.ServerStream
}

type EchoRequest

type EchoRequest struct {
	// The message.
	Message              string   `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request of the Echo method.

func (*EchoRequest) Descriptor

func (*EchoRequest) Descriptor() ([]byte, []int)

func (*EchoRequest) GetMessage

func (m *EchoRequest) GetMessage() string

func (*EchoRequest) ProtoMessage

func (*EchoRequest) ProtoMessage()

func (*EchoRequest) Reset

func (m *EchoRequest) Reset()

func (*EchoRequest) String

func (m *EchoRequest) String() string

func (*EchoRequest) XXX_DiscardUnknown

func (m *EchoRequest) XXX_DiscardUnknown()

func (*EchoRequest) XXX_Marshal

func (m *EchoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EchoRequest) XXX_Merge

func (m *EchoRequest) XXX_Merge(src proto.Message)

func (*EchoRequest) XXX_Size

func (m *EchoRequest) XXX_Size() int

func (*EchoRequest) XXX_Unmarshal

func (m *EchoRequest) XXX_Unmarshal(b []byte) error

type EchoResponse

type EchoResponse struct {
	// The result status.
	Status *StatusProto `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// The echo message.
	Echo                 string   `protobuf:"bytes,2,opt,name=echo,proto3" json:"echo,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Response of the Echo method.

func (*EchoResponse) Descriptor

func (*EchoResponse) Descriptor() ([]byte, []int)

func (*EchoResponse) GetEcho

func (m *EchoResponse) GetEcho() string

func (*EchoResponse) GetStatus

func (m *EchoResponse) GetStatus() *StatusProto

func (*EchoResponse) ProtoMessage

func (*EchoResponse) ProtoMessage()

func (*EchoResponse) Reset

func (m *EchoResponse) Reset()

func (*EchoResponse) String

func (m *EchoResponse) String() string

func (*EchoResponse) XXX_DiscardUnknown

func (m *EchoResponse) XXX_DiscardUnknown()

func (*EchoResponse) XXX_Marshal

func (m *EchoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EchoResponse) XXX_Merge

func (m *EchoResponse) XXX_Merge(src proto.Message)

func (*EchoResponse) XXX_Size

func (m *EchoResponse) XXX_Size() int

func (*EchoResponse) XXX_Unmarshal

func (m *EchoResponse) XXX_Unmarshal(b []byte) error

type GetFileSizeRequest

type GetFileSizeRequest struct {
	// The index of the DBM object.  The origin is 0.
	DbmIndex             int32    `protobuf:"varint,1,opt,name=dbm_index,json=dbmIndex,proto3" json:"dbm_index,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request of the GetFileSize method.

func (*GetFileSizeRequest) Descriptor

func (*GetFileSizeRequest) Descriptor() ([]byte, []int)

func (*GetFileSizeRequest) GetDbmIndex

func (m *GetFileSizeRequest) GetDbmIndex() int32

func (*GetFileSizeRequest) ProtoMessage

func (*GetFileSizeRequest) ProtoMessage()

func (*GetFileSizeRequest) Reset

func (m *GetFileSizeRequest) Reset()

func (*GetFileSizeRequest) String

func (m *GetFileSizeRequest) String() string

func (*GetFileSizeRequest) XXX_DiscardUnknown

func (m *GetFileSizeRequest) XXX_DiscardUnknown()

func (*GetFileSizeRequest) XXX_Marshal

func (m *GetFileSizeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetFileSizeRequest) XXX_Merge

func (m *GetFileSizeRequest) XXX_Merge(src proto.Message)

func (*GetFileSizeRequest) XXX_Size

func (m *GetFileSizeRequest) XXX_Size() int

func (*GetFileSizeRequest) XXX_Unmarshal

func (m *GetFileSizeRequest) XXX_Unmarshal(b []byte) error

type GetFileSizeResponse

type GetFileSizeResponse struct {
	// The result status.
	Status *StatusProto `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// The current file size.
	FileSize             int64    `protobuf:"varint,2,opt,name=file_size,json=fileSize,proto3" json:"file_size,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Response of the GetFileSize method.

func (*GetFileSizeResponse) Descriptor

func (*GetFileSizeResponse) Descriptor() ([]byte, []int)

func (*GetFileSizeResponse) GetFileSize

func (m *GetFileSizeResponse) GetFileSize() int64

func (*GetFileSizeResponse) GetStatus

func (m *GetFileSizeResponse) GetStatus() *StatusProto

func (*GetFileSizeResponse) ProtoMessage

func (*GetFileSizeResponse) ProtoMessage()

func (*GetFileSizeResponse) Reset

func (m *GetFileSizeResponse) Reset()

func (*GetFileSizeResponse) String

func (m *GetFileSizeResponse) String() string

func (*GetFileSizeResponse) XXX_DiscardUnknown

func (m *GetFileSizeResponse) XXX_DiscardUnknown()

func (*GetFileSizeResponse) XXX_Marshal

func (m *GetFileSizeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetFileSizeResponse) XXX_Merge

func (m *GetFileSizeResponse) XXX_Merge(src proto.Message)

func (*GetFileSizeResponse) XXX_Size

func (m *GetFileSizeResponse) XXX_Size() int

func (*GetFileSizeResponse) XXX_Unmarshal

func (m *GetFileSizeResponse) XXX_Unmarshal(b []byte) error

type GetMultiRequest

type GetMultiRequest struct {
	// The index of the DBM object.  The origin is 0.
	DbmIndex int32 `protobuf:"varint,1,opt,name=dbm_index,json=dbmIndex,proto3" json:"dbm_index,omitempty"`
	// The keys of records.
	Keys                 [][]byte `protobuf:"bytes,2,rep,name=keys,proto3" json:"keys,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request of the GetMulti method.

func (*GetMultiRequest) Descriptor

func (*GetMultiRequest) Descriptor() ([]byte, []int)

func (*GetMultiRequest) GetDbmIndex

func (m *GetMultiRequest) GetDbmIndex() int32

func (*GetMultiRequest) GetKeys

func (m *GetMultiRequest) GetKeys() [][]byte

func (*GetMultiRequest) ProtoMessage

func (*GetMultiRequest) ProtoMessage()

func (*GetMultiRequest) Reset

func (m *GetMultiRequest) Reset()

func (*GetMultiRequest) String

func (m *GetMultiRequest) String() string

func (*GetMultiRequest) XXX_DiscardUnknown

func (m *GetMultiRequest) XXX_DiscardUnknown()

func (*GetMultiRequest) XXX_Marshal

func (m *GetMultiRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetMultiRequest) XXX_Merge

func (m *GetMultiRequest) XXX_Merge(src proto.Message)

func (*GetMultiRequest) XXX_Size

func (m *GetMultiRequest) XXX_Size() int

func (*GetMultiRequest) XXX_Unmarshal

func (m *GetMultiRequest) XXX_Unmarshal(b []byte) error

type GetMultiResponse

type GetMultiResponse struct {
	// The result status.
	Status *StatusProto `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// Retrieved records.
	Records              []*BytesPair `protobuf:"bytes,2,rep,name=records,proto3" json:"records,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

Response of the GetMulti method.

func (*GetMultiResponse) Descriptor

func (*GetMultiResponse) Descriptor() ([]byte, []int)

func (*GetMultiResponse) GetRecords

func (m *GetMultiResponse) GetRecords() []*BytesPair

func (*GetMultiResponse) GetStatus

func (m *GetMultiResponse) GetStatus() *StatusProto

func (*GetMultiResponse) ProtoMessage

func (*GetMultiResponse) ProtoMessage()

func (*GetMultiResponse) Reset

func (m *GetMultiResponse) Reset()

func (*GetMultiResponse) String

func (m *GetMultiResponse) String() string

func (*GetMultiResponse) XXX_DiscardUnknown

func (m *GetMultiResponse) XXX_DiscardUnknown()

func (*GetMultiResponse) XXX_Marshal

func (m *GetMultiResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetMultiResponse) XXX_Merge

func (m *GetMultiResponse) XXX_Merge(src proto.Message)

func (*GetMultiResponse) XXX_Size

func (m *GetMultiResponse) XXX_Size() int

func (*GetMultiResponse) XXX_Unmarshal

func (m *GetMultiResponse) XXX_Unmarshal(b []byte) error

type GetRequest

type GetRequest struct {
	// The index of the DBM object.  The origin is 0.
	DbmIndex int32 `protobuf:"varint,1,opt,name=dbm_index,json=dbmIndex,proto3" json:"dbm_index,omitempty"`
	// The key of the record.
	Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	// Whether to omit the value in the response.
	OmitValue            bool     `protobuf:"varint,3,opt,name=omit_value,json=omitValue,proto3" json:"omit_value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request of the Get method.

func (*GetRequest) Descriptor

func (*GetRequest) Descriptor() ([]byte, []int)

func (*GetRequest) GetDbmIndex

func (m *GetRequest) GetDbmIndex() int32

func (*GetRequest) GetKey

func (m *GetRequest) GetKey() []byte

func (*GetRequest) GetOmitValue

func (m *GetRequest) GetOmitValue() bool

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) Reset

func (m *GetRequest) Reset()

func (*GetRequest) String

func (m *GetRequest) String() string

func (*GetRequest) XXX_DiscardUnknown

func (m *GetRequest) XXX_DiscardUnknown()

func (*GetRequest) XXX_Marshal

func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetRequest) XXX_Merge

func (m *GetRequest) XXX_Merge(src proto.Message)

func (*GetRequest) XXX_Size

func (m *GetRequest) XXX_Size() int

func (*GetRequest) XXX_Unmarshal

func (m *GetRequest) XXX_Unmarshal(b []byte) error

type GetResponse

type GetResponse struct {
	// The result status.
	Status *StatusProto `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// The value of the record.
	Value                []byte   `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Response of the Get method.

func (*GetResponse) Descriptor

func (*GetResponse) Descriptor() ([]byte, []int)

func (*GetResponse) GetStatus

func (m *GetResponse) GetStatus() *StatusProto

func (*GetResponse) GetValue

func (m *GetResponse) GetValue() []byte

func (*GetResponse) ProtoMessage

func (*GetResponse) ProtoMessage()

func (*GetResponse) Reset

func (m *GetResponse) Reset()

func (*GetResponse) String

func (m *GetResponse) String() string

func (*GetResponse) XXX_DiscardUnknown

func (m *GetResponse) XXX_DiscardUnknown()

func (*GetResponse) XXX_Marshal

func (m *GetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetResponse) XXX_Merge

func (m *GetResponse) XXX_Merge(src proto.Message)

func (*GetResponse) XXX_Size

func (m *GetResponse) XXX_Size() int

func (*GetResponse) XXX_Unmarshal

func (m *GetResponse) XXX_Unmarshal(b []byte) error

type IncrementRequest

type IncrementRequest struct {
	// The index of the DBM object.  The origin is 0.
	DbmIndex int32 `protobuf:"varint,1,opt,name=dbm_index,json=dbmIndex,proto3" json:"dbm_index,omitempty"`
	// The key of the record.
	Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	// The incremental value.
	Increment int64 `protobuf:"varint,3,opt,name=increment,proto3" json:"increment,omitempty"`
	// The initial value.
	Initial              int64    `protobuf:"varint,4,opt,name=initial,proto3" json:"initial,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request of the Increment method.

func (*IncrementRequest) Descriptor

func (*IncrementRequest) Descriptor() ([]byte, []int)

func (*IncrementRequest) GetDbmIndex

func (m *IncrementRequest) GetDbmIndex() int32

func (*IncrementRequest) GetIncrement

func (m *IncrementRequest) GetIncrement() int64

func (*IncrementRequest) GetInitial

func (m *IncrementRequest) GetInitial() int64

func (*IncrementRequest) GetKey

func (m *IncrementRequest) GetKey() []byte

func (*IncrementRequest) ProtoMessage

func (*IncrementRequest) ProtoMessage()

func (*IncrementRequest) Reset

func (m *IncrementRequest) Reset()

func (*IncrementRequest) String

func (m *IncrementRequest) String() string

func (*IncrementRequest) XXX_DiscardUnknown

func (m *IncrementRequest) XXX_DiscardUnknown()

func (*IncrementRequest) XXX_Marshal

func (m *IncrementRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*IncrementRequest) XXX_Merge

func (m *IncrementRequest) XXX_Merge(src proto.Message)

func (*IncrementRequest) XXX_Size

func (m *IncrementRequest) XXX_Size() int

func (*IncrementRequest) XXX_Unmarshal

func (m *IncrementRequest) XXX_Unmarshal(b []byte) error

type IncrementResponse

type IncrementResponse struct {
	// The result status.
	Status *StatusProto `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// The current value.
	Current              int64    `protobuf:"varint,2,opt,name=current,proto3" json:"current,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Response of the Increment method.

func (*IncrementResponse) Descriptor

func (*IncrementResponse) Descriptor() ([]byte, []int)

func (*IncrementResponse) GetCurrent

func (m *IncrementResponse) GetCurrent() int64

func (*IncrementResponse) GetStatus

func (m *IncrementResponse) GetStatus() *StatusProto

func (*IncrementResponse) ProtoMessage

func (*IncrementResponse) ProtoMessage()

func (*IncrementResponse) Reset

func (m *IncrementResponse) Reset()

func (*IncrementResponse) String

func (m *IncrementResponse) String() string

func (*IncrementResponse) XXX_DiscardUnknown

func (m *IncrementResponse) XXX_DiscardUnknown()

func (*IncrementResponse) XXX_Marshal

func (m *IncrementResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*IncrementResponse) XXX_Merge

func (m *IncrementResponse) XXX_Merge(src proto.Message)

func (*IncrementResponse) XXX_Size

func (m *IncrementResponse) XXX_Size() int

func (*IncrementResponse) XXX_Unmarshal

func (m *IncrementResponse) XXX_Unmarshal(b []byte) error

type InspectRequest

type InspectRequest struct {
	// The index of the DBM object.  The origin is 0.
	// If it is negative, metadata of the server is retrieved.
	DbmIndex             int32    `protobuf:"varint,1,opt,name=dbm_index,json=dbmIndex,proto3" json:"dbm_index,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request of the Inspect method.

func (*InspectRequest) Descriptor

func (*InspectRequest) Descriptor() ([]byte, []int)

func (*InspectRequest) GetDbmIndex

func (m *InspectRequest) GetDbmIndex() int32

func (*InspectRequest) ProtoMessage

func (*InspectRequest) ProtoMessage()

func (*InspectRequest) Reset

func (m *InspectRequest) Reset()

func (*InspectRequest) String

func (m *InspectRequest) String() string

func (*InspectRequest) XXX_DiscardUnknown

func (m *InspectRequest) XXX_DiscardUnknown()

func (*InspectRequest) XXX_Marshal

func (m *InspectRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*InspectRequest) XXX_Merge

func (m *InspectRequest) XXX_Merge(src proto.Message)

func (*InspectRequest) XXX_Size

func (m *InspectRequest) XXX_Size() int

func (*InspectRequest) XXX_Unmarshal

func (m *InspectRequest) XXX_Unmarshal(b []byte) error

type InspectResponse

type InspectResponse struct {
	// The result status.
	Status *StatusProto `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// Key-value pairs of the attributes.
	Records              []*StringPair `protobuf:"bytes,2,rep,name=records,proto3" json:"records,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

Response of the Inspect method.

func (*InspectResponse) Descriptor

func (*InspectResponse) Descriptor() ([]byte, []int)

func (*InspectResponse) GetRecords

func (m *InspectResponse) GetRecords() []*StringPair

func (*InspectResponse) GetStatus

func (m *InspectResponse) GetStatus() *StatusProto

func (*InspectResponse) ProtoMessage

func (*InspectResponse) ProtoMessage()

func (*InspectResponse) Reset

func (m *InspectResponse) Reset()

func (*InspectResponse) String

func (m *InspectResponse) String() string

func (*InspectResponse) XXX_DiscardUnknown

func (m *InspectResponse) XXX_DiscardUnknown()

func (*InspectResponse) XXX_Marshal

func (m *InspectResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*InspectResponse) XXX_Merge

func (m *InspectResponse) XXX_Merge(src proto.Message)

func (*InspectResponse) XXX_Size

func (m *InspectResponse) XXX_Size() int

func (*InspectResponse) XXX_Unmarshal

func (m *InspectResponse) XXX_Unmarshal(b []byte) error

type IterateRequest

type IterateRequest struct {
	// The index of the DBM object.  The origin is 0.
	DbmIndex int32 `protobuf:"varint,1,opt,name=dbm_index,json=dbmIndex,proto3" json:"dbm_index,omitempty"`
	// The jump operation.
	Operation IterateRequest_OpType `protobuf:"varint,2,opt,name=operation,proto3,enum=tkrzw_rpc.IterateRequest_OpType" json:"operation,omitempty"`
	// The key of the operation.
	Key []byte `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
	// The value of the operation.
	Value []byte `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"`
	// Whether the jump condition is inclusive.
	JumpInclusive bool `protobuf:"varint,5,opt,name=jump_inclusive,json=jumpInclusive,proto3" json:"jump_inclusive,omitempty"`
	// Whether to omit the key in the response.
	OmitKey bool `protobuf:"varint,6,opt,name=omit_key,json=omitKey,proto3" json:"omit_key,omitempty"`
	// Whether to omit the value in the response.
	OmitValue            bool     `protobuf:"varint,7,opt,name=omit_value,json=omitValue,proto3" json:"omit_value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request of the Iterate method.

func (*IterateRequest) Descriptor

func (*IterateRequest) Descriptor() ([]byte, []int)

func (*IterateRequest) GetDbmIndex

func (m *IterateRequest) GetDbmIndex() int32

func (*IterateRequest) GetJumpInclusive

func (m *IterateRequest) GetJumpInclusive() bool

func (*IterateRequest) GetKey

func (m *IterateRequest) GetKey() []byte

func (*IterateRequest) GetOmitKey

func (m *IterateRequest) GetOmitKey() bool

func (*IterateRequest) GetOmitValue

func (m *IterateRequest) GetOmitValue() bool

func (*IterateRequest) GetOperation

func (m *IterateRequest) GetOperation() IterateRequest_OpType

func (*IterateRequest) GetValue

func (m *IterateRequest) GetValue() []byte

func (*IterateRequest) ProtoMessage

func (*IterateRequest) ProtoMessage()

func (*IterateRequest) Reset

func (m *IterateRequest) Reset()

func (*IterateRequest) String

func (m *IterateRequest) String() string

func (*IterateRequest) XXX_DiscardUnknown

func (m *IterateRequest) XXX_DiscardUnknown()

func (*IterateRequest) XXX_Marshal

func (m *IterateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*IterateRequest) XXX_Merge

func (m *IterateRequest) XXX_Merge(src proto.Message)

func (*IterateRequest) XXX_Size

func (m *IterateRequest) XXX_Size() int

func (*IterateRequest) XXX_Unmarshal

func (m *IterateRequest) XXX_Unmarshal(b []byte) error

type IterateRequest_OpType

type IterateRequest_OpType int32

Enumeration for operations.

const (
	// No operation.
	IterateRequest_OP_NONE IterateRequest_OpType = 0
	// Jumps to the first record.
	IterateRequest_OP_FIRST IterateRequest_OpType = 1
	// Jumps to the last record.
	IterateRequest_OP_LAST IterateRequest_OpType = 2
	// Jumps to a record of the key.
	IterateRequest_OP_JUMP IterateRequest_OpType = 3
	// Jumps to the last record lower than the key.
	IterateRequest_OP_JUMP_LOWER IterateRequest_OpType = 4
	// Jumps to the last record upper than the key.
	IterateRequest_OP_JUMP_UPPER IterateRequest_OpType = 5
	// Moves to the next record.
	IterateRequest_OP_NEXT IterateRequest_OpType = 6
	// Moves to the previous record.
	IterateRequest_OP_PREVIOUS IterateRequest_OpType = 7
	// Gets the current record.
	IterateRequest_OP_GET IterateRequest_OpType = 8
	// Sets the current record value.
	IterateRequest_OP_SET IterateRequest_OpType = 9
	// Removes the current record.
	IterateRequest_OP_REMOVE IterateRequest_OpType = 10
	// Gets the current record and moves the iterator.
	IterateRequest_OP_STEP IterateRequest_OpType = 11
)

func (IterateRequest_OpType) EnumDescriptor

func (IterateRequest_OpType) EnumDescriptor() ([]byte, []int)

func (IterateRequest_OpType) String

func (x IterateRequest_OpType) String() string

type IterateResponse

type IterateResponse struct {
	// The result status.
	Status *StatusProto `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// The key of the record.
	Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	// The value of the record.
	Value                []byte   `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Response of the Iterate method.

func (*IterateResponse) Descriptor

func (*IterateResponse) Descriptor() ([]byte, []int)

func (*IterateResponse) GetKey

func (m *IterateResponse) GetKey() []byte

func (*IterateResponse) GetStatus

func (m *IterateResponse) GetStatus() *StatusProto

func (*IterateResponse) GetValue

func (m *IterateResponse) GetValue() []byte

func (*IterateResponse) ProtoMessage

func (*IterateResponse) ProtoMessage()

func (*IterateResponse) Reset

func (m *IterateResponse) Reset()

func (*IterateResponse) String

func (m *IterateResponse) String() string

func (*IterateResponse) XXX_DiscardUnknown

func (m *IterateResponse) XXX_DiscardUnknown()

func (*IterateResponse) XXX_Marshal

func (m *IterateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*IterateResponse) XXX_Merge

func (m *IterateResponse) XXX_Merge(src proto.Message)

func (*IterateResponse) XXX_Size

func (m *IterateResponse) XXX_Size() int

func (*IterateResponse) XXX_Unmarshal

func (m *IterateResponse) XXX_Unmarshal(b []byte) error

type Iterator

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

Iterator for each record.

An iterator is made by the "MakeIerator" method of RemoteDBM. Every unused iterator object should be destructed explicitly by the "Destruct" method to free resources.

func (*Iterator) Destruct

func (self *Iterator) Destruct()

Releases the resource explicitly.

func (*Iterator) First

func (self *Iterator) First() *Status

Initializes the iterator to indicate the first record.

@return The result status.

Even if there's no record, the operation doesn't fail.

func (*Iterator) Get

func (self *Iterator) Get() ([]byte, []byte, *Status)

Gets the key and the value of the current record of the iterator.

@return The key and the value of the current record, and the result status.

func (*Iterator) GetKey

func (self *Iterator) GetKey() ([]byte, *Status)

Gets the key of the current record.

@return The key of the current record and the result status.

func (*Iterator) GetKeyStr

func (self *Iterator) GetKeyStr() (string, *Status)

Gets the key of the current record, as a string.

@return The key of the current record and the result status.

func (*Iterator) GetStr

func (self *Iterator) GetStr() (string, string, *Status)

Gets the key and the value of the current record of the iterator, as strings.

@return The key and the value of the current record, and the result status.

func (*Iterator) GetValue

func (self *Iterator) GetValue() ([]byte, *Status)

Gets the value of the current record.

@return The value of the current record and the result status.

func (*Iterator) GetValueStr

func (self *Iterator) GetValueStr() (string, *Status)

Gets the value of the current record, as a string.

@return The value of the current record and the result status.

func (*Iterator) Jump

func (self *Iterator) Jump(key interface{}) *Status

Initializes the iterator to indicate a specific record.

@param key The key of the record to look for. @return The result status.

Ordered databases can support "lower bound" jump; If there's no record with the same key, the iterator refers to the first record whose key is greater than the given key. The operation fails with unordered databases if there's no record with the same key.

func (*Iterator) JumpLower

func (self *Iterator) JumpLower(key interface{}, inclusive bool) *Status

Initializes the iterator to indicate the last record whose key is lower than a given key.

@param key The key to compare with. @param inclusive If true, the considtion is inclusive: equal to or lower than the key. @return The result status.

Even if there's no matching record, the operation doesn't fail. This method is suppoerted only by ordered databases.

func (*Iterator) JumpUpper

func (self *Iterator) JumpUpper(key interface{}, inclusive bool) *Status

Initializes the iterator to indicate the first record whose key is upper than a given key.

@param key The key to compare with. @param inclusive If true, the considtion is inclusive: equal to or upper than the key. @return The result status.

Even if there's no matching record, the operation doesn't fail. This method is suppoerted only by ordered databases.

func (*Iterator) Last

func (self *Iterator) Last() *Status

Initializes the iterator to indicate the last record.

@return The result status.

Even if there's no record, the operation doesn't fail. This method is suppoerted only by ordered databases.

func (*Iterator) Next

func (self *Iterator) Next() *Status

Moves the iterator to the next record.

@return The result status.

If the current record is missing, the operation fails. Even if there's no next record, the operation doesn't fail.

func (*Iterator) Previous

func (self *Iterator) Previous() *Status

Moves the iterator to the previous record.

@return The result status.

If the current record is missing, the operation fails. Even if there's no previous record, the operation doesn't fail. This method is suppoerted only by ordered databases.

func (*Iterator) Remove

func (self *Iterator) Remove() *Status

Removes the current record.

@return The result status.

func (*Iterator) Set

func (self *Iterator) Set(value interface{}) *Status

Sets the value of the current record.

@param value The value of the record. @return The result status.

func (*Iterator) Step

func (self *Iterator) Step() ([]byte, []byte, *Status)

Gets the current record and moves the iterator to the next record.

@return The key and the value of the current record, and the result status.

func (*Iterator) StepStr

func (self *Iterator) StepStr() (string, string, *Status)

Gets the current record and moves the iterator to the next record, as strings.

@return The key and the value of the current record, and the result status.

func (*Iterator) String

func (self *Iterator) String() string

Makes a string representing the iterator.

@return The string representing the iterator.

type KeyValuePair

type KeyValuePair struct {
	// The key.
	Key []byte
	// The value
	Value []byte
}

A pair of the key and the value of a record.

type KeyValueStrPair

type KeyValueStrPair struct {
	// The key.
	Key string
	// The value
	Value string
}

A string pair of the key and the value of a record.

type PopFirstRequest

type PopFirstRequest struct {
	// The index of the DBM object.  The origin is 0.
	DbmIndex int32 `protobuf:"varint,1,opt,name=dbm_index,json=dbmIndex,proto3" json:"dbm_index,omitempty"`
	// Whether to omit the key in the response.
	OmitKey bool `protobuf:"varint,2,opt,name=omit_key,json=omitKey,proto3" json:"omit_key,omitempty"`
	// Whether to omit the value in the response.
	OmitValue bool `protobuf:"varint,3,opt,name=omit_value,json=omitValue,proto3" json:"omit_value,omitempty"`
	// The wait time in seconds before retrying.
	RetryWait            float64  `protobuf:"fixed64,4,opt,name=retry_wait,json=retryWait,proto3" json:"retry_wait,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request of the PopFirst method.

func (*PopFirstRequest) Descriptor

func (*PopFirstRequest) Descriptor() ([]byte, []int)

func (*PopFirstRequest) GetDbmIndex

func (m *PopFirstRequest) GetDbmIndex() int32

func (*PopFirstRequest) GetOmitKey

func (m *PopFirstRequest) GetOmitKey() bool

func (*PopFirstRequest) GetOmitValue

func (m *PopFirstRequest) GetOmitValue() bool

func (*PopFirstRequest) GetRetryWait

func (m *PopFirstRequest) GetRetryWait() float64

func (*PopFirstRequest) ProtoMessage

func (*PopFirstRequest) ProtoMessage()

func (*PopFirstRequest) Reset

func (m *PopFirstRequest) Reset()

func (*PopFirstRequest) String

func (m *PopFirstRequest) String() string

func (*PopFirstRequest) XXX_DiscardUnknown

func (m *PopFirstRequest) XXX_DiscardUnknown()

func (*PopFirstRequest) XXX_Marshal

func (m *PopFirstRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PopFirstRequest) XXX_Merge

func (m *PopFirstRequest) XXX_Merge(src proto.Message)

func (*PopFirstRequest) XXX_Size

func (m *PopFirstRequest) XXX_Size() int

func (*PopFirstRequest) XXX_Unmarshal

func (m *PopFirstRequest) XXX_Unmarshal(b []byte) error

type PopFirstResponse

type PopFirstResponse struct {
	// The result status.
	Status *StatusProto `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// The key of the record.
	Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	// The value of the record.
	Value                []byte   `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Response of the PopFirst method.

func (*PopFirstResponse) Descriptor

func (*PopFirstResponse) Descriptor() ([]byte, []int)

func (*PopFirstResponse) GetKey

func (m *PopFirstResponse) GetKey() []byte

func (*PopFirstResponse) GetStatus

func (m *PopFirstResponse) GetStatus() *StatusProto

func (*PopFirstResponse) GetValue

func (m *PopFirstResponse) GetValue() []byte

func (*PopFirstResponse) ProtoMessage

func (*PopFirstResponse) ProtoMessage()

func (*PopFirstResponse) Reset

func (m *PopFirstResponse) Reset()

func (*PopFirstResponse) String

func (m *PopFirstResponse) String() string

func (*PopFirstResponse) XXX_DiscardUnknown

func (m *PopFirstResponse) XXX_DiscardUnknown()

func (*PopFirstResponse) XXX_Marshal

func (m *PopFirstResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PopFirstResponse) XXX_Merge

func (m *PopFirstResponse) XXX_Merge(src proto.Message)

func (*PopFirstResponse) XXX_Size

func (m *PopFirstResponse) XXX_Size() int

func (*PopFirstResponse) XXX_Unmarshal

func (m *PopFirstResponse) XXX_Unmarshal(b []byte) error

type PushLastRequest

type PushLastRequest struct {
	// The index of the DBM object.  The origin is 0.
	DbmIndex int32 `protobuf:"varint,1,opt,name=dbm_index,json=dbmIndex,proto3" json:"dbm_index,omitempty"`
	// The value of the record.
	Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// The current wall time used to generate the key.
	Wtime float64 `protobuf:"fixed64,3,opt,name=wtime,proto3" json:"wtime,omitempty"`
	// If true, notification signal is sent.
	Notify               bool     `protobuf:"varint,4,opt,name=notify,proto3" json:"notify,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request of the PushLast method.

func (*PushLastRequest) Descriptor

func (*PushLastRequest) Descriptor() ([]byte, []int)

func (*PushLastRequest) GetDbmIndex

func (m *PushLastRequest) GetDbmIndex() int32

func (*PushLastRequest) GetNotify

func (m *PushLastRequest) GetNotify() bool

func (*PushLastRequest) GetValue

func (m *PushLastRequest) GetValue() []byte

func (*PushLastRequest) GetWtime

func (m *PushLastRequest) GetWtime() float64

func (*PushLastRequest) ProtoMessage

func (*PushLastRequest) ProtoMessage()

func (*PushLastRequest) Reset

func (m *PushLastRequest) Reset()

func (*PushLastRequest) String

func (m *PushLastRequest) String() string

func (*PushLastRequest) XXX_DiscardUnknown

func (m *PushLastRequest) XXX_DiscardUnknown()

func (*PushLastRequest) XXX_Marshal

func (m *PushLastRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PushLastRequest) XXX_Merge

func (m *PushLastRequest) XXX_Merge(src proto.Message)

func (*PushLastRequest) XXX_Size

func (m *PushLastRequest) XXX_Size() int

func (*PushLastRequest) XXX_Unmarshal

func (m *PushLastRequest) XXX_Unmarshal(b []byte) error

type PushLastResponse

type PushLastResponse struct {
	// The result status.
	Status               *StatusProto `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

Response of the PushLast method.

func (*PushLastResponse) Descriptor

func (*PushLastResponse) Descriptor() ([]byte, []int)

func (*PushLastResponse) GetStatus

func (m *PushLastResponse) GetStatus() *StatusProto

func (*PushLastResponse) ProtoMessage

func (*PushLastResponse) ProtoMessage()

func (*PushLastResponse) Reset

func (m *PushLastResponse) Reset()

func (*PushLastResponse) String

func (m *PushLastResponse) String() string

func (*PushLastResponse) XXX_DiscardUnknown

func (m *PushLastResponse) XXX_DiscardUnknown()

func (*PushLastResponse) XXX_Marshal

func (m *PushLastResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PushLastResponse) XXX_Merge

func (m *PushLastResponse) XXX_Merge(src proto.Message)

func (*PushLastResponse) XXX_Size

func (m *PushLastResponse) XXX_Size() int

func (*PushLastResponse) XXX_Unmarshal

func (m *PushLastResponse) XXX_Unmarshal(b []byte) error

type RebuildRequest

type RebuildRequest struct {
	// The index of the DBM object.  The origin is 0.
	DbmIndex int32 `protobuf:"varint,1,opt,name=dbm_index,json=dbmIndex,proto3" json:"dbm_index,omitempty"`
	// Optional parameters.
	Params               []*StringPair `protobuf:"bytes,2,rep,name=params,proto3" json:"params,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

Request of the Rebuild method.

func (*RebuildRequest) Descriptor

func (*RebuildRequest) Descriptor() ([]byte, []int)

func (*RebuildRequest) GetDbmIndex

func (m *RebuildRequest) GetDbmIndex() int32

func (*RebuildRequest) GetParams

func (m *RebuildRequest) GetParams() []*StringPair

func (*RebuildRequest) ProtoMessage

func (*RebuildRequest) ProtoMessage()

func (*RebuildRequest) Reset

func (m *RebuildRequest) Reset()

func (*RebuildRequest) String

func (m *RebuildRequest) String() string

func (*RebuildRequest) XXX_DiscardUnknown

func (m *RebuildRequest) XXX_DiscardUnknown()

func (*RebuildRequest) XXX_Marshal

func (m *RebuildRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RebuildRequest) XXX_Merge

func (m *RebuildRequest) XXX_Merge(src proto.Message)

func (*RebuildRequest) XXX_Size

func (m *RebuildRequest) XXX_Size() int

func (*RebuildRequest) XXX_Unmarshal

func (m *RebuildRequest) XXX_Unmarshal(b []byte) error

type RebuildResponse

type RebuildResponse struct {
	// The result status.
	Status               *StatusProto `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

Response of the Rebuild method.

func (*RebuildResponse) Descriptor

func (*RebuildResponse) Descriptor() ([]byte, []int)

func (*RebuildResponse) GetStatus

func (m *RebuildResponse) GetStatus() *StatusProto

func (*RebuildResponse) ProtoMessage

func (*RebuildResponse) ProtoMessage()

func (*RebuildResponse) Reset

func (m *RebuildResponse) Reset()

func (*RebuildResponse) String

func (m *RebuildResponse) String() string

func (*RebuildResponse) XXX_DiscardUnknown

func (m *RebuildResponse) XXX_DiscardUnknown()

func (*RebuildResponse) XXX_Marshal

func (m *RebuildResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RebuildResponse) XXX_Merge

func (m *RebuildResponse) XXX_Merge(src proto.Message)

func (*RebuildResponse) XXX_Size

func (m *RebuildResponse) XXX_Size() int

func (*RebuildResponse) XXX_Unmarshal

func (m *RebuildResponse) XXX_Unmarshal(b []byte) error

type RecordState

type RecordState struct {
	// Whether the record exists.
	Existence bool `protobuf:"varint,1,opt,name=existence,proto3" json:"existence,omitempty"`
	// The key.
	Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	// The value.
	Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	// True to accept any value.
	AnyValue             bool     `protobuf:"varint,4,opt,name=any_value,json=anyValue,proto3" json:"any_value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Record existence and value.

func (*RecordState) Descriptor

func (*RecordState) Descriptor() ([]byte, []int)

func (*RecordState) GetAnyValue

func (m *RecordState) GetAnyValue() bool

func (*RecordState) GetExistence

func (m *RecordState) GetExistence() bool

func (*RecordState) GetKey

func (m *RecordState) GetKey() []byte

func (*RecordState) GetValue

func (m *RecordState) GetValue() []byte

func (*RecordState) ProtoMessage

func (*RecordState) ProtoMessage()

func (*RecordState) Reset

func (m *RecordState) Reset()

func (*RecordState) String

func (m *RecordState) String() string

func (*RecordState) XXX_DiscardUnknown

func (m *RecordState) XXX_DiscardUnknown()

func (*RecordState) XXX_Marshal

func (m *RecordState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RecordState) XXX_Merge

func (m *RecordState) XXX_Merge(src proto.Message)

func (*RecordState) XXX_Size

func (m *RecordState) XXX_Size() int

func (*RecordState) XXX_Unmarshal

func (m *RecordState) XXX_Unmarshal(b []byte) error

type RekeyRequest

type RekeyRequest struct {
	// The index of the DBM object.  The origin is 0.
	DbmIndex int32 `protobuf:"varint,1,opt,name=dbm_index,json=dbmIndex,proto3" json:"dbm_index,omitempty"`
	// The old key of the record.
	OldKey []byte `protobuf:"bytes,2,opt,name=old_key,json=oldKey,proto3" json:"old_key,omitempty"`
	// The new key of the record.
	NewKey []byte `protobuf:"bytes,3,opt,name=new_key,json=newKey,proto3" json:"new_key,omitempty"`
	// Whether to overwrite the existing record.
	Overwrite bool `protobuf:"varint,4,opt,name=overwrite,proto3" json:"overwrite,omitempty"`
	// Whether to retain the record of the old key.
	Copying              bool     `protobuf:"varint,5,opt,name=copying,proto3" json:"copying,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request of the Rekey method.

func (*RekeyRequest) Descriptor

func (*RekeyRequest) Descriptor() ([]byte, []int)

func (*RekeyRequest) GetCopying

func (m *RekeyRequest) GetCopying() bool

func (*RekeyRequest) GetDbmIndex

func (m *RekeyRequest) GetDbmIndex() int32

func (*RekeyRequest) GetNewKey

func (m *RekeyRequest) GetNewKey() []byte

func (*RekeyRequest) GetOldKey

func (m *RekeyRequest) GetOldKey() []byte

func (*RekeyRequest) GetOverwrite

func (m *RekeyRequest) GetOverwrite() bool

func (*RekeyRequest) ProtoMessage

func (*RekeyRequest) ProtoMessage()

func (*RekeyRequest) Reset

func (m *RekeyRequest) Reset()

func (*RekeyRequest) String

func (m *RekeyRequest) String() string

func (*RekeyRequest) XXX_DiscardUnknown

func (m *RekeyRequest) XXX_DiscardUnknown()

func (*RekeyRequest) XXX_Marshal

func (m *RekeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RekeyRequest) XXX_Merge

func (m *RekeyRequest) XXX_Merge(src proto.Message)

func (*RekeyRequest) XXX_Size

func (m *RekeyRequest) XXX_Size() int

func (*RekeyRequest) XXX_Unmarshal

func (m *RekeyRequest) XXX_Unmarshal(b []byte) error

type RekeyResponse

type RekeyResponse struct {
	// The result status.
	Status               *StatusProto `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

Response of the Rekey method.

func (*RekeyResponse) Descriptor

func (*RekeyResponse) Descriptor() ([]byte, []int)

func (*RekeyResponse) GetStatus

func (m *RekeyResponse) GetStatus() *StatusProto

func (*RekeyResponse) ProtoMessage

func (*RekeyResponse) ProtoMessage()

func (*RekeyResponse) Reset

func (m *RekeyResponse) Reset()

func (*RekeyResponse) String

func (m *RekeyResponse) String() string

func (*RekeyResponse) XXX_DiscardUnknown

func (m *RekeyResponse) XXX_DiscardUnknown()

func (*RekeyResponse) XXX_Marshal

func (m *RekeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RekeyResponse) XXX_Merge

func (m *RekeyResponse) XXX_Merge(src proto.Message)

func (*RekeyResponse) XXX_Size

func (m *RekeyResponse) XXX_Size() int

func (*RekeyResponse) XXX_Unmarshal

func (m *RekeyResponse) XXX_Unmarshal(b []byte) error

type RemoteDBM

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

Remote database manager.

All operations except for "Connect" and "Disconnect" are thread-safe; Multiple threads can access the same database concurrently. The "SetDBMIndex" affects all threads so it should be called before the object is shared.

func NewRemoteDBM

func NewRemoteDBM() *RemoteDBM

Makes a new RemoteDBM object.

@return The pointer to the created remote database object.

func (*RemoteDBM) Append

func (self *RemoteDBM) Append(key interface{}, value interface{}, delim interface{}) *Status

Appends data at the end of a record of a key.

@param key The key of the record. @param value The value to append. @param delim The delimiter to put after the existing record. @return The result status.

If there's no existing record, the value is set without the delimiter.

func (*RemoteDBM) AppendMulti

func (self *RemoteDBM) AppendMulti(records map[string][]byte, delim interface{}) *Status

Appends data to multiple records.

@param records Records to append. @param delim The delimiter to put after the existing record. @return The result status.

If there's no existing record, the value is set without the delimiter.

func (*RemoteDBM) AppendMultiStr

func (self *RemoteDBM) AppendMultiStr(records map[string]string, delim interface{}) *Status

Appends data to multiple records, with string data.

@param records Records to append. @param delim The delimiter to put after the existing record. @return The result status.

If there's no existing record, the value is set without the delimiter.

func (*RemoteDBM) Check

func (self *RemoteDBM) Check(key interface{}) bool

Checks if a record exists or not.

@param key The key of the record. @return True if the record exists, or false if not.

func (*RemoteDBM) Clear

func (self *RemoteDBM) Clear() *Status

Removes all records.

@return The result status.

func (*RemoteDBM) CompareExchange

func (self *RemoteDBM) CompareExchange(
	key interface{}, expected interface{}, desired interface{}) *Status

Compares the value of a record and exchanges if the condition meets.

@param key The key of the record. @param expected The expected value. If it is nil or NilString, no existing record is expected. If it is AnyBytes or AnyString, an existing record with any value is expacted. @param desired The desired value. If it is nil or NilString, the record is to be removed. If it is AnyBytes or AnyString, no update is done. @return The result status. If the condition doesn't meet, StatusInfeasibleError is returned.

func (*RemoteDBM) CompareExchangeAdvanced

func (self *RemoteDBM) CompareExchangeAdvanced(
	key interface{}, expected interface{}, desired interface{},
	retryWait float64, notify bool) ([]byte, *Status)

Does compare-and-exchange and/or gets the old value of the record.

@param key The key of the record. @param expected The expected value. If it is nil or NilString, no existing record is expected. If it is AnyBytes or AnyString, an existing record with any value is expacted. @param desired The desired value. If it is nil or NilString, the record is to be removed. If it is AnyBytes or AnyString, no update is done. @param retryWait The maximum wait time in seconds before retrying. If it is zero, no retry is done. If it is positive, retry is done after waiting for the notifications of the next update for the time at most. @param notify If true, a notification signal is sent to wake up retrying threads. @return The old value and the result status. If the condition doesn't meet, the state is INFEASIBLE_ERROR. If there's no existing record, the value is nil.

func (*RemoteDBM) CompareExchangeAdvancedStr

func (self *RemoteDBM) CompareExchangeAdvancedStr(
	key interface{}, expected interface{}, desired interface{},
	retryWait float64, notify bool) (string, *Status)

Does compare-and-exchange and/or gets the old value of the record, as a string.

@param key The key of the record. @param expected The expected value. If it is nil or NilString, no existing record is expected. If it is AnyBytes or AnyString, an existing record with any value is expacted. @param desired The desired value. If it is nil or NilString, the record is to be removed. If it is AnyBytes or AnyString, no update is done. @param retryWait The maximum wait time in seconds before retrying. If it is zero, no retry is done. If it is positive, retry is done after waiting for the notifications of the next update for the time at most. @param notify If true, a notification signal is sent to wake up retrying threads. @return The old value and the result status. If the condition doesn't meet, the state is INFEASIBLE_ERROR. If there's no existing record, the value is NilString.

func (*RemoteDBM) CompareExchangeMulti

func (self *RemoteDBM) CompareExchangeMulti(
	expected []KeyValuePair, desired []KeyValuePair) *Status

Compares the values of records and exchanges if the condition meets.

@param expected A sequence of pairs of the record keys and their expected values. If the value is nil, no existing record is expected. If the value is AnyBytes, an existing record with any value is expacted. @param desired A sequence of pairs of the record keys and their desired values. If the value is nil, the record is to be removed. @return The result status. If the condition doesn't meet, StatusInfeasibleError is returned.

func (*RemoteDBM) CompareExchangeMultiStr

func (self *RemoteDBM) CompareExchangeMultiStr(
	expected []KeyValueStrPair, desired []KeyValueStrPair) *Status

Compares the values of records and exchanges if the condition meets, using string data.

@param expected A sequence of pairs of the record keys and their expected values. If the value is NilString, no existing record is expected. If the value is AnyString, an existing record with any value is expacted. @param desired A sequence of pairs of the record keys and their desired values. If the value is NilString, the record is to be removed. @return The result status. If the condition doesn't meet, StatusInfeasibleError is returned.

func (*RemoteDBM) Connect

func (self *RemoteDBM) Connect(address string, timeout float64, auth_config string) *Status

Connects to the server.

@param address The address or the host name of the server and its port number. For IPv4 address, it's like "127.0.0.1:1978". For IPv6, it's like "[::1]:1978". For UNIX domain sockets, it's like "unix:/path/to/file". @param timeout The timeout in seconds for connection and each operation. Negative means unlimited. @param auth_config The authentication configuration. It it is empty, no authentication is done. If it begins with "ssl:", the SSL authentication is done. Key-value parameters in "key=value,key=value,..." format comes next. For SSL, "key", "cert", and "root" parameters specify the paths of the client private key file, the client certificate file, and the root CA certificate file respectively. @return The result status.

func (*RemoteDBM) Count

func (self *RemoteDBM) Count() (int64, *Status)

Gets the number of records.

@return The number of records and the result status.

func (*RemoteDBM) CountSimple

func (self *RemoteDBM) CountSimple() int64

Gets the number of records, in a simple way.

@return The number of records or -1 on failure.

func (*RemoteDBM) Disconnect

func (self *RemoteDBM) Disconnect() *Status

Disconnects the connection to the server.

@return The result status.

func (*RemoteDBM) Each

func (self *RemoteDBM) Each() <-chan KeyValuePair

Makes a channel to read each records.

@return the channel to read each records. All values should be read from the channel to avoid resource leak.

func (*RemoteDBM) EachStr

func (self *RemoteDBM) EachStr() <-chan KeyValueStrPair

Makes a channel to read each records, as strings.

@return the channel to read each records. All values should be read from the channel to avoid resource leak.

func (*RemoteDBM) Echo

func (self *RemoteDBM) Echo(message string) (string, *Status)

Sends a message and gets back the echo message.

@param message The message to send. @param status A status object to which the result status is assigned. It can be omitted. @return The string value of the echoed message or None on failure.

func (*RemoteDBM) Get

func (self *RemoteDBM) Get(key interface{}) ([]byte, *Status)

Gets the value of a record of a key.

@param key The key of the record. @return The bytes value of the matching record and the result status. If there's no matching record, the status is StatusNotFoundError.

func (*RemoteDBM) GetFileSize

func (self *RemoteDBM) GetFileSize() (int64, *Status)

Gets the current file size of the database.

@return The current file size of the database and the result status.

func (*RemoteDBM) GetFileSizeSimple

func (self *RemoteDBM) GetFileSizeSimple() int64

Gets the current file size of the database, in a simple way.

@return The current file size of the database, or -1 on failure.

func (*RemoteDBM) GetMulti

func (self *RemoteDBM) GetMulti(keys []string) map[string][]byte

Gets the values of multiple records of keys.

@param keys The keys of records to retrieve. @return A map of retrieved records. Keys which don't match existing records are ignored.

func (*RemoteDBM) GetMultiStr

func (self *RemoteDBM) GetMultiStr(keys []string) map[string]string

Gets the values of multiple records of keys, as strings.

@param keys The keys of records to retrieve. @eturn A map of retrieved records. Keys which don't match existing records are ignored.

func (*RemoteDBM) GetSimple

func (self *RemoteDBM) GetSimple(key interface{}, defaultValue interface{}) []byte

Gets the value of a record of a key, in a simple way.

@param key The key of the record. @param defaultValue The value to be returned on failure. @return The value of the matching record on success, or the default value on failure.

func (*RemoteDBM) GetStr

func (self *RemoteDBM) GetStr(key interface{}) (string, *Status)

Gets the value of a record of a key, as a string.

@param key The key of the record. @return The string value of the matching record and the result status. If there's no matching record, the status is StatusNotFoundError.

func (*RemoteDBM) GetStrSimple

func (self *RemoteDBM) GetStrSimple(key interface{}, defaultValue interface{}) string

Gets the value of a record of a key, in a simple way, as a string.

@param key The key of the record. @param defaultValue The value to be returned on failure. @return The value of the matching record on success, or the default value on failure.

func (*RemoteDBM) Increment

func (self *RemoteDBM) Increment(
	key interface{}, inc interface{}, init interface{}) (int64, *Status)

Increments the numeric value of a record.

@param key The key of the record. @param inc The incremental value. If it is Int64Min, the current value is not changed and a new record is not created. @param init The initial value. @return The current value and the result status.

func (*RemoteDBM) Inspect

func (self *RemoteDBM) Inspect() map[string]string

Inspects the database.

@return A map of property names and their values.

If the DBM index is negative, basic metadata of all DBMs are obtained.

func (*RemoteDBM) MakeIterator

func (self *RemoteDBM) MakeIterator() *Iterator

Makes an iterator for each record.

@return The iterator for each record.

Every iterator should be destructed explicitly by the "Destruct" method.

func (*RemoteDBM) PopFirst

func (self *RemoteDBM) PopFirst(retryWait float64) ([]byte, []byte, *Status)

Gets the first record and removes it.

@param retryWait The maximum wait time in seconds before retrying. If it is zero, no retry is done. If it is positive, retry is done after waiting for the notifications of the next update for the time at most. @return The key and the value of the first record, and the result status.

func (*RemoteDBM) PopFirstStr

func (self *RemoteDBM) PopFirstStr(retryWait float64) (string, string, *Status)

Gets the first record as strings and removes it.

@param retryWait The maximum wait time in seconds before retrying. If it is zero, no retry is done. If it is positive, retry is done after waiting for the notifications of the next update for the time at most. @return The key and the value of the first record, and the result status.

func (*RemoteDBM) PushLast

func (self *RemoteDBM) PushLast(value interface{}, wtime float64, notify bool) *Status

Adds a record with a key of the current timestamp.

@param value The value of the record. @param wtime The current wall time used to generate the key. If it is None, the system clock is used. @param notify If true, notification signal is sent. @return The result status.

The key is generated as an 8-bite big-endian binary string of the timestamp. If there is an existing record matching the generated key, the key is regenerated and the attempt is repeated until it succeeds.

func (*RemoteDBM) Rebuild

func (self *RemoteDBM) Rebuild(params map[string]string) *Status

Rebuilds the entire database.

@param params Optional parameters. If it is nil, it is ignored. @return The result status.

The optional parameters are the same as the Open method of the local DBM class and the database configurations of the server command. Omitted tuning parameters are kept the same or implicitly optimized.

In addition, HashDBM, TreeDBM, and SkipDBM supports the following parameters.

- skip_broken_records (bool): If true, the operation continues even if there are broken records which can be skipped. - sync_hard (bool): If true, physical synchronization with the hardware is done before finishing the rebuilt file.

func (*RemoteDBM) Rekey

func (self *RemoteDBM) Rekey(oldKey interface{}, newKey interface{},
	overwrite bool, copying bool) *Status

Changes the key of a record.

@param oldKey The old key of the record. @param newKey The new key of the record. @param overwrite Whether to overwrite the existing record of the new key. @param copying Whether to retain the record of the old key. @return The result status. If there's no matching record to the old key, NOT_FOUND_ERROR is returned. If the overwrite flag is false and there is an existing record of the new key, DUPLICATION ERROR is returned.

This method is done atomically by ProcessMulti. The other threads observe that the record has either the old key or the new key. No intermediate states are observed.

func (*RemoteDBM) Remove

func (self *RemoteDBM) Remove(key interface{}) *Status

Removes a record of a key.

@param key The key of the record. @return The result status. If there's no matching record, StatusNotFoundError is returned.

func (*RemoteDBM) RemoveMulti

func (self *RemoteDBM) RemoveMulti(keys []string) *Status

Removes records of keys.

@param key The keys of the records. @return The result status. If there are missing records, StatusNotFoundError is returned.

func (*RemoteDBM) Search

func (self *RemoteDBM) Search(mode string, pattern string, capacity int) []string

Searches the database and get keys which match a pattern.

@param mode The search mode. "contain" extracts keys containing the pattern. "begin" extracts keys beginning with the pattern. "end" extracts keys ending with the pattern. "regex" extracts keys partially matches the pattern of a regular expression. "edit" extracts keys whose edit distance to the UTF-8 pattern is the least. "editbin" extracts keys whose edit distance to the binary pattern is the least. @param pattern The pattern for matching. @param capacity The maximum records to obtain. 0 means unlimited. @return A list of keys matching the condition.

func (*RemoteDBM) Set

func (self *RemoteDBM) Set(key interface{}, value interface{}, overwrite bool) *Status

Sets a record of a key and a value.

@param key The key of the record. @param value The value of the record. @param overwrite Whether to overwrite the existing value. @return The result status. If overwriting is abandoned, StatusDuplicationError is returned.

func (*RemoteDBM) SetDBMIndex

func (self *RemoteDBM) SetDBMIndex(dbmIndex int32) *Status

Sets the index of the DBM to access.

@param dbmIndex The index of the DBM to access. @eturn The result status.

func (*RemoteDBM) SetMulti

func (self *RemoteDBM) SetMulti(records map[string][]byte, overwrite bool) *Status

Sets multiple records.

@param records Records to store. @param overwrite Whether to overwrite the existing value if there's a record with the same key. If true, the existing value is overwritten by the new value. If false, the operation is given up and an error status is returned. @return The result status. If there are records avoiding overwriting, StatusDuplicationError is returned.

func (*RemoteDBM) SetMultiStr

func (self *RemoteDBM) SetMultiStr(records map[string]string, overwrite bool) *Status

Sets multiple records, with string data.

@param records Records to store. @param overwrite Whether to overwrite the existing value if there's a record with the same key. If true, the existing value is overwritten by the new value. If false, the operation is given up and an error status is returned. @return The result status. If there are records avoiding overwriting, StatusDuplicationError is set.

func (*RemoteDBM) ShouldBeRebuilt

func (self *RemoteDBM) ShouldBeRebuilt() (bool, *Status)

Checks whether the database should be rebuilt.

@return The result decision and the result status. The decision is true to be optimized or false with no necessity.

func (*RemoteDBM) ShouldBeRebuiltSimple

func (self *RemoteDBM) ShouldBeRebuiltSimple() bool

Checks whether the database should be rebuilt, in a simple way.

@return True to be optimized or false with no necessity.

func (*RemoteDBM) String

func (self *RemoteDBM) String() string

Makes a string representing the remote database.

@return The string representing the remote database.

func (*RemoteDBM) Synchronize

func (self *RemoteDBM) Synchronize(hard bool, params map[string]string) *Status

Synchronizes the content of the database to the file system.

@param hard True to do physical synchronization with the hardware or false to do only logical synchronization with the file system. @param params Optional parameters. If it is nil, it is ignored. @return The result status.

The "reducer" parameter specifies the reducer for SkipDBM. "ReduceToFirst", "ReduceToSecond", "ReduceToLast", etc are supported. If the parameter "make_backup" exists, a backup file is created in the same directory as the database file. The backup file name has a date suffix in GMT, like ".backup.20210831213749". If the value of "make_backup" not empty, it is the value is used as the suffix.

type RemoveMultiRequest

type RemoveMultiRequest struct {
	// The index of the DBM object.  The origin is 0.
	DbmIndex int32 `protobuf:"varint,1,opt,name=dbm_index,json=dbmIndex,proto3" json:"dbm_index,omitempty"`
	// The keys of records.
	Keys                 [][]byte `protobuf:"bytes,2,rep,name=keys,proto3" json:"keys,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request of the RemoveMulti method.

func (*RemoveMultiRequest) Descriptor

func (*RemoveMultiRequest) Descriptor() ([]byte, []int)

func (*RemoveMultiRequest) GetDbmIndex

func (m *RemoveMultiRequest) GetDbmIndex() int32

func (*RemoveMultiRequest) GetKeys

func (m *RemoveMultiRequest) GetKeys() [][]byte

func (*RemoveMultiRequest) ProtoMessage

func (*RemoveMultiRequest) ProtoMessage()

func (*RemoveMultiRequest) Reset

func (m *RemoveMultiRequest) Reset()

func (*RemoveMultiRequest) String

func (m *RemoveMultiRequest) String() string

func (*RemoveMultiRequest) XXX_DiscardUnknown

func (m *RemoveMultiRequest) XXX_DiscardUnknown()

func (*RemoveMultiRequest) XXX_Marshal

func (m *RemoveMultiRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RemoveMultiRequest) XXX_Merge

func (m *RemoveMultiRequest) XXX_Merge(src proto.Message)

func (*RemoveMultiRequest) XXX_Size

func (m *RemoveMultiRequest) XXX_Size() int

func (*RemoveMultiRequest) XXX_Unmarshal

func (m *RemoveMultiRequest) XXX_Unmarshal(b []byte) error

type RemoveMultiResponse

type RemoveMultiResponse struct {
	// The result status.
	Status               *StatusProto `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

Response of the RemoveMulti method.

func (*RemoveMultiResponse) Descriptor

func (*RemoveMultiResponse) Descriptor() ([]byte, []int)

func (*RemoveMultiResponse) GetStatus

func (m *RemoveMultiResponse) GetStatus() *StatusProto

func (*RemoveMultiResponse) ProtoMessage

func (*RemoveMultiResponse) ProtoMessage()

func (*RemoveMultiResponse) Reset

func (m *RemoveMultiResponse) Reset()

func (*RemoveMultiResponse) String

func (m *RemoveMultiResponse) String() string

func (*RemoveMultiResponse) XXX_DiscardUnknown

func (m *RemoveMultiResponse) XXX_DiscardUnknown()

func (*RemoveMultiResponse) XXX_Marshal

func (m *RemoveMultiResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RemoveMultiResponse) XXX_Merge

func (m *RemoveMultiResponse) XXX_Merge(src proto.Message)

func (*RemoveMultiResponse) XXX_Size

func (m *RemoveMultiResponse) XXX_Size() int

func (*RemoveMultiResponse) XXX_Unmarshal

func (m *RemoveMultiResponse) XXX_Unmarshal(b []byte) error

type RemoveRequest

type RemoveRequest struct {
	// The index of the DBM object.  The origin is 0.
	DbmIndex int32 `protobuf:"varint,1,opt,name=dbm_index,json=dbmIndex,proto3" json:"dbm_index,omitempty"`
	// The key of the record.
	Key                  []byte   `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request of the Remove method.

func (*RemoveRequest) Descriptor

func (*RemoveRequest) Descriptor() ([]byte, []int)

func (*RemoveRequest) GetDbmIndex

func (m *RemoveRequest) GetDbmIndex() int32

func (*RemoveRequest) GetKey

func (m *RemoveRequest) GetKey() []byte

func (*RemoveRequest) ProtoMessage

func (*RemoveRequest) ProtoMessage()

func (*RemoveRequest) Reset

func (m *RemoveRequest) Reset()

func (*RemoveRequest) String

func (m *RemoveRequest) String() string

func (*RemoveRequest) XXX_DiscardUnknown

func (m *RemoveRequest) XXX_DiscardUnknown()

func (*RemoveRequest) XXX_Marshal

func (m *RemoveRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RemoveRequest) XXX_Merge

func (m *RemoveRequest) XXX_Merge(src proto.Message)

func (*RemoveRequest) XXX_Size

func (m *RemoveRequest) XXX_Size() int

func (*RemoveRequest) XXX_Unmarshal

func (m *RemoveRequest) XXX_Unmarshal(b []byte) error

type RemoveResponse

type RemoveResponse struct {
	// The result status.
	Status               *StatusProto `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

Response of the Remove method.

func (*RemoveResponse) Descriptor

func (*RemoveResponse) Descriptor() ([]byte, []int)

func (*RemoveResponse) GetStatus

func (m *RemoveResponse) GetStatus() *StatusProto

func (*RemoveResponse) ProtoMessage

func (*RemoveResponse) ProtoMessage()

func (*RemoveResponse) Reset

func (m *RemoveResponse) Reset()

func (*RemoveResponse) String

func (m *RemoveResponse) String() string

func (*RemoveResponse) XXX_DiscardUnknown

func (m *RemoveResponse) XXX_DiscardUnknown()

func (*RemoveResponse) XXX_Marshal

func (m *RemoveResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RemoveResponse) XXX_Merge

func (m *RemoveResponse) XXX_Merge(src proto.Message)

func (*RemoveResponse) XXX_Size

func (m *RemoveResponse) XXX_Size() int

func (*RemoveResponse) XXX_Unmarshal

func (m *RemoveResponse) XXX_Unmarshal(b []byte) error

type ReplicateRequest

type ReplicateRequest struct {
	// The minimum timestamp of update logs to retrieve.
	MinTimestamp int64 `protobuf:"varint,1,opt,name=min_timestamp,json=minTimestamp,proto3" json:"min_timestamp,omitempty"`
	// The server ID of the client.
	ServerId int32 `protobuf:"varint,2,opt,name=server_id,json=serverId,proto3" json:"server_id,omitempty"`
	// The time in seconds to wait for the next log.
	WaitTime             float64  `protobuf:"fixed64,3,opt,name=wait_time,json=waitTime,proto3" json:"wait_time,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request of the Replicate method.

func (*ReplicateRequest) Descriptor

func (*ReplicateRequest) Descriptor() ([]byte, []int)

func (*ReplicateRequest) GetMinTimestamp

func (m *ReplicateRequest) GetMinTimestamp() int64

func (*ReplicateRequest) GetServerId

func (m *ReplicateRequest) GetServerId() int32

func (*ReplicateRequest) GetWaitTime

func (m *ReplicateRequest) GetWaitTime() float64

func (*ReplicateRequest) ProtoMessage

func (*ReplicateRequest) ProtoMessage()

func (*ReplicateRequest) Reset

func (m *ReplicateRequest) Reset()

func (*ReplicateRequest) String

func (m *ReplicateRequest) String() string

func (*ReplicateRequest) XXX_DiscardUnknown

func (m *ReplicateRequest) XXX_DiscardUnknown()

func (*ReplicateRequest) XXX_Marshal

func (m *ReplicateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ReplicateRequest) XXX_Merge

func (m *ReplicateRequest) XXX_Merge(src proto.Message)

func (*ReplicateRequest) XXX_Size

func (m *ReplicateRequest) XXX_Size() int

func (*ReplicateRequest) XXX_Unmarshal

func (m *ReplicateRequest) XXX_Unmarshal(b []byte) error

type ReplicateResponse

type ReplicateResponse struct {
	// The result status.
	Status *StatusProto `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// The timestamp of the update.
	Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// The server ID of the client.
	ServerId int32 `protobuf:"varint,3,opt,name=server_id,json=serverId,proto3" json:"server_id,omitempty"`
	// The index of the DBM object.  The origin is 0.
	DbmIndex int32 `protobuf:"varint,4,opt,name=dbm_index,json=dbmIndex,proto3" json:"dbm_index,omitempty"`
	// The operation type.
	OpType ReplicateResponse_OpType `protobuf:"varint,5,opt,name=op_type,json=opType,proto3,enum=tkrzw_rpc.ReplicateResponse_OpType" json:"op_type,omitempty"`
	// The record key.
	Key []byte `protobuf:"bytes,6,opt,name=key,proto3" json:"key,omitempty"`
	// The record value.
	Value                []byte   `protobuf:"bytes,7,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Response of the Replicate method. The first response is OP_NOOP and provides the server ID of the server.

func (*ReplicateResponse) Descriptor

func (*ReplicateResponse) Descriptor() ([]byte, []int)

func (*ReplicateResponse) GetDbmIndex

func (m *ReplicateResponse) GetDbmIndex() int32

func (*ReplicateResponse) GetKey

func (m *ReplicateResponse) GetKey() []byte

func (*ReplicateResponse) GetOpType

func (*ReplicateResponse) GetServerId

func (m *ReplicateResponse) GetServerId() int32

func (*ReplicateResponse) GetStatus

func (m *ReplicateResponse) GetStatus() *StatusProto

func (*ReplicateResponse) GetTimestamp

func (m *ReplicateResponse) GetTimestamp() int64

func (*ReplicateResponse) GetValue

func (m *ReplicateResponse) GetValue() []byte

func (*ReplicateResponse) ProtoMessage

func (*ReplicateResponse) ProtoMessage()

func (*ReplicateResponse) Reset

func (m *ReplicateResponse) Reset()

func (*ReplicateResponse) String

func (m *ReplicateResponse) String() string

func (*ReplicateResponse) XXX_DiscardUnknown

func (m *ReplicateResponse) XXX_DiscardUnknown()

func (*ReplicateResponse) XXX_Marshal

func (m *ReplicateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ReplicateResponse) XXX_Merge

func (m *ReplicateResponse) XXX_Merge(src proto.Message)

func (*ReplicateResponse) XXX_Size

func (m *ReplicateResponse) XXX_Size() int

func (*ReplicateResponse) XXX_Unmarshal

func (m *ReplicateResponse) XXX_Unmarshal(b []byte) error

type ReplicateResponse_OpType

type ReplicateResponse_OpType int32

Enumeration for operations.

const (
	// No operation.
	ReplicateResponse_OP_NOOP ReplicateResponse_OpType = 0
	// To modify or add a record.
	ReplicateResponse_OP_SET ReplicateResponse_OpType = 1
	// To remove a record.
	ReplicateResponse_OP_REMOVE ReplicateResponse_OpType = 2
	// To remove all records.
	ReplicateResponse_OP_CLEAR ReplicateResponse_OpType = 3
)

func (ReplicateResponse_OpType) EnumDescriptor

func (ReplicateResponse_OpType) EnumDescriptor() ([]byte, []int)

func (ReplicateResponse_OpType) String

func (x ReplicateResponse_OpType) String() string

type SearchRequest

type SearchRequest struct {
	// The index of the DBM object.  The origin is 0.
	DbmIndex int32 `protobuf:"varint,1,opt,name=dbm_index,json=dbmIndex,proto3" json:"dbm_index,omitempty"`
	// The search mode.
	Mode string `protobuf:"bytes,2,opt,name=mode,proto3" json:"mode,omitempty"`
	// The pattern for matching.
	Pattern []byte `protobuf:"bytes,3,opt,name=pattern,proto3" json:"pattern,omitempty"`
	// The maximum records to obtain.
	Capacity             int32    `protobuf:"varint,4,opt,name=capacity,proto3" json:"capacity,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request of the Search method.

func (*SearchRequest) Descriptor

func (*SearchRequest) Descriptor() ([]byte, []int)

func (*SearchRequest) GetCapacity

func (m *SearchRequest) GetCapacity() int32

func (*SearchRequest) GetDbmIndex

func (m *SearchRequest) GetDbmIndex() int32

func (*SearchRequest) GetMode

func (m *SearchRequest) GetMode() string

func (*SearchRequest) GetPattern

func (m *SearchRequest) GetPattern() []byte

func (*SearchRequest) ProtoMessage

func (*SearchRequest) ProtoMessage()

func (*SearchRequest) Reset

func (m *SearchRequest) Reset()

func (*SearchRequest) String

func (m *SearchRequest) String() string

func (*SearchRequest) XXX_DiscardUnknown

func (m *SearchRequest) XXX_DiscardUnknown()

func (*SearchRequest) XXX_Marshal

func (m *SearchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SearchRequest) XXX_Merge

func (m *SearchRequest) XXX_Merge(src proto.Message)

func (*SearchRequest) XXX_Size

func (m *SearchRequest) XXX_Size() int

func (*SearchRequest) XXX_Unmarshal

func (m *SearchRequest) XXX_Unmarshal(b []byte) error

type SearchResponse

type SearchResponse struct {
	// The result status.
	Status *StatusProto `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// A list of matched keys.
	Matched              [][]byte `protobuf:"bytes,2,rep,name=matched,proto3" json:"matched,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Response of the Search method.

func (*SearchResponse) Descriptor

func (*SearchResponse) Descriptor() ([]byte, []int)

func (*SearchResponse) GetMatched

func (m *SearchResponse) GetMatched() [][]byte

func (*SearchResponse) GetStatus

func (m *SearchResponse) GetStatus() *StatusProto

func (*SearchResponse) ProtoMessage

func (*SearchResponse) ProtoMessage()

func (*SearchResponse) Reset

func (m *SearchResponse) Reset()

func (*SearchResponse) String

func (m *SearchResponse) String() string

func (*SearchResponse) XXX_DiscardUnknown

func (m *SearchResponse) XXX_DiscardUnknown()

func (*SearchResponse) XXX_Marshal

func (m *SearchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SearchResponse) XXX_Merge

func (m *SearchResponse) XXX_Merge(src proto.Message)

func (*SearchResponse) XXX_Size

func (m *SearchResponse) XXX_Size() int

func (*SearchResponse) XXX_Unmarshal

func (m *SearchResponse) XXX_Unmarshal(b []byte) error

type SetMultiRequest

type SetMultiRequest struct {
	// The index of the DBM object.  The origin is 0.
	DbmIndex int32 `protobuf:"varint,1,opt,name=dbm_index,json=dbmIndex,proto3" json:"dbm_index,omitempty"`
	// Records to store.
	Records []*BytesPair `protobuf:"bytes,2,rep,name=records,proto3" json:"records,omitempty"`
	// True to overwrite the existing record.
	Overwrite            bool     `protobuf:"varint,3,opt,name=overwrite,proto3" json:"overwrite,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request of the SetMulti method.

func (*SetMultiRequest) Descriptor

func (*SetMultiRequest) Descriptor() ([]byte, []int)

func (*SetMultiRequest) GetDbmIndex

func (m *SetMultiRequest) GetDbmIndex() int32

func (*SetMultiRequest) GetOverwrite

func (m *SetMultiRequest) GetOverwrite() bool

func (*SetMultiRequest) GetRecords

func (m *SetMultiRequest) GetRecords() []*BytesPair

func (*SetMultiRequest) ProtoMessage

func (*SetMultiRequest) ProtoMessage()

func (*SetMultiRequest) Reset

func (m *SetMultiRequest) Reset()

func (*SetMultiRequest) String

func (m *SetMultiRequest) String() string

func (*SetMultiRequest) XXX_DiscardUnknown

func (m *SetMultiRequest) XXX_DiscardUnknown()

func (*SetMultiRequest) XXX_Marshal

func (m *SetMultiRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SetMultiRequest) XXX_Merge

func (m *SetMultiRequest) XXX_Merge(src proto.Message)

func (*SetMultiRequest) XXX_Size

func (m *SetMultiRequest) XXX_Size() int

func (*SetMultiRequest) XXX_Unmarshal

func (m *SetMultiRequest) XXX_Unmarshal(b []byte) error

type SetMultiResponse

type SetMultiResponse struct {
	// The result status.
	Status               *StatusProto `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

Response of the SetMulti method.

func (*SetMultiResponse) Descriptor

func (*SetMultiResponse) Descriptor() ([]byte, []int)

func (*SetMultiResponse) GetStatus

func (m *SetMultiResponse) GetStatus() *StatusProto

func (*SetMultiResponse) ProtoMessage

func (*SetMultiResponse) ProtoMessage()

func (*SetMultiResponse) Reset

func (m *SetMultiResponse) Reset()

func (*SetMultiResponse) String

func (m *SetMultiResponse) String() string

func (*SetMultiResponse) XXX_DiscardUnknown

func (m *SetMultiResponse) XXX_DiscardUnknown()

func (*SetMultiResponse) XXX_Marshal

func (m *SetMultiResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SetMultiResponse) XXX_Merge

func (m *SetMultiResponse) XXX_Merge(src proto.Message)

func (*SetMultiResponse) XXX_Size

func (m *SetMultiResponse) XXX_Size() int

func (*SetMultiResponse) XXX_Unmarshal

func (m *SetMultiResponse) XXX_Unmarshal(b []byte) error

type SetRequest

type SetRequest struct {
	// The index of the DBM object.  The origin is 0.
	DbmIndex int32 `protobuf:"varint,1,opt,name=dbm_index,json=dbmIndex,proto3" json:"dbm_index,omitempty"`
	// The key of the record.
	Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	// The value of the record.
	Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	// True to overwrite the existing record.
	Overwrite            bool     `protobuf:"varint,4,opt,name=overwrite,proto3" json:"overwrite,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request of the Set method.

func (*SetRequest) Descriptor

func (*SetRequest) Descriptor() ([]byte, []int)

func (*SetRequest) GetDbmIndex

func (m *SetRequest) GetDbmIndex() int32

func (*SetRequest) GetKey

func (m *SetRequest) GetKey() []byte

func (*SetRequest) GetOverwrite

func (m *SetRequest) GetOverwrite() bool

func (*SetRequest) GetValue

func (m *SetRequest) GetValue() []byte

func (*SetRequest) ProtoMessage

func (*SetRequest) ProtoMessage()

func (*SetRequest) Reset

func (m *SetRequest) Reset()

func (*SetRequest) String

func (m *SetRequest) String() string

func (*SetRequest) XXX_DiscardUnknown

func (m *SetRequest) XXX_DiscardUnknown()

func (*SetRequest) XXX_Marshal

func (m *SetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SetRequest) XXX_Merge

func (m *SetRequest) XXX_Merge(src proto.Message)

func (*SetRequest) XXX_Size

func (m *SetRequest) XXX_Size() int

func (*SetRequest) XXX_Unmarshal

func (m *SetRequest) XXX_Unmarshal(b []byte) error

type SetResponse

type SetResponse struct {
	// The result status.
	Status               *StatusProto `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

Response of the Set method.

func (*SetResponse) Descriptor

func (*SetResponse) Descriptor() ([]byte, []int)

func (*SetResponse) GetStatus

func (m *SetResponse) GetStatus() *StatusProto

func (*SetResponse) ProtoMessage

func (*SetResponse) ProtoMessage()

func (*SetResponse) Reset

func (m *SetResponse) Reset()

func (*SetResponse) String

func (m *SetResponse) String() string

func (*SetResponse) XXX_DiscardUnknown

func (m *SetResponse) XXX_DiscardUnknown()

func (*SetResponse) XXX_Marshal

func (m *SetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SetResponse) XXX_Merge

func (m *SetResponse) XXX_Merge(src proto.Message)

func (*SetResponse) XXX_Size

func (m *SetResponse) XXX_Size() int

func (*SetResponse) XXX_Unmarshal

func (m *SetResponse) XXX_Unmarshal(b []byte) error

type ShouldBeRebuiltRequest

type ShouldBeRebuiltRequest struct {
	// The index of the DBM object.  The origin is 0.
	DbmIndex             int32    `protobuf:"varint,1,opt,name=dbm_index,json=dbmIndex,proto3" json:"dbm_index,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request of the ShouldBeRebuilt method.

func (*ShouldBeRebuiltRequest) Descriptor

func (*ShouldBeRebuiltRequest) Descriptor() ([]byte, []int)

func (*ShouldBeRebuiltRequest) GetDbmIndex

func (m *ShouldBeRebuiltRequest) GetDbmIndex() int32

func (*ShouldBeRebuiltRequest) ProtoMessage

func (*ShouldBeRebuiltRequest) ProtoMessage()

func (*ShouldBeRebuiltRequest) Reset

func (m *ShouldBeRebuiltRequest) Reset()

func (*ShouldBeRebuiltRequest) String

func (m *ShouldBeRebuiltRequest) String() string

func (*ShouldBeRebuiltRequest) XXX_DiscardUnknown

func (m *ShouldBeRebuiltRequest) XXX_DiscardUnknown()

func (*ShouldBeRebuiltRequest) XXX_Marshal

func (m *ShouldBeRebuiltRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ShouldBeRebuiltRequest) XXX_Merge

func (m *ShouldBeRebuiltRequest) XXX_Merge(src proto.Message)

func (*ShouldBeRebuiltRequest) XXX_Size

func (m *ShouldBeRebuiltRequest) XXX_Size() int

func (*ShouldBeRebuiltRequest) XXX_Unmarshal

func (m *ShouldBeRebuiltRequest) XXX_Unmarshal(b []byte) error

type ShouldBeRebuiltResponse

type ShouldBeRebuiltResponse struct {
	// The result status.
	Status *StatusProto `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// Whether to be rebuilt.
	Tobe                 bool     `protobuf:"varint,2,opt,name=tobe,proto3" json:"tobe,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Response of the ShouldBeRebuilt method.

func (*ShouldBeRebuiltResponse) Descriptor

func (*ShouldBeRebuiltResponse) Descriptor() ([]byte, []int)

func (*ShouldBeRebuiltResponse) GetStatus

func (m *ShouldBeRebuiltResponse) GetStatus() *StatusProto

func (*ShouldBeRebuiltResponse) GetTobe

func (m *ShouldBeRebuiltResponse) GetTobe() bool

func (*ShouldBeRebuiltResponse) ProtoMessage

func (*ShouldBeRebuiltResponse) ProtoMessage()

func (*ShouldBeRebuiltResponse) Reset

func (m *ShouldBeRebuiltResponse) Reset()

func (*ShouldBeRebuiltResponse) String

func (m *ShouldBeRebuiltResponse) String() string

func (*ShouldBeRebuiltResponse) XXX_DiscardUnknown

func (m *ShouldBeRebuiltResponse) XXX_DiscardUnknown()

func (*ShouldBeRebuiltResponse) XXX_Marshal

func (m *ShouldBeRebuiltResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ShouldBeRebuiltResponse) XXX_Merge

func (m *ShouldBeRebuiltResponse) XXX_Merge(src proto.Message)

func (*ShouldBeRebuiltResponse) XXX_Size

func (m *ShouldBeRebuiltResponse) XXX_Size() int

func (*ShouldBeRebuiltResponse) XXX_Unmarshal

func (m *ShouldBeRebuiltResponse) XXX_Unmarshal(b []byte) error

type Status

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

Status of operations.

func NewStatus

func NewStatus(args ...interface{}) *Status

Makes a new status, with variable length arguments.

@param args If the first parameter is given, it is treated as the status code. If the second parameter is given, it is treated as the status message. @return The pointer to the created status object.

func NewStatus1

func NewStatus1(code StatusCode) *Status

Makes a new status, with a code.

@param code The status code. @return The pointer to the created status object.

func NewStatus2

func NewStatus2(code StatusCode, message string) *Status

Makes a new status, with a code and a message.

@param code The status code. @param code The status message. @return The pointer to the created status object.

func (*Status) Equals

func (self *Status) Equals(rhs interface{}) bool

Checks whether the status equal to another status.

@param rhs a status object or a status code. @param true for the both operands are equal, or false if not.

func (*Status) Error

func (self *Status) Error() string

Makes a string representing the status, to be an error.

@return The string representing the code. As the string contains only the code, comparison of the result strings is not affected by difference of the status messages. the additiona

func (*Status) GetCode

func (self *Status) GetCode() StatusCode

Gets the status code.

@return The status code.

func (*Status) GetMessage

func (self *Status) GetMessage() string

Gets the status message.

@return The status message.

func (*Status) IsOK

func (self *Status) IsOK() bool

Returns true if the status is success.

@return true if the status is success, or false if not.

func (*Status) Join

func (self *Status) Join(rhs *Status)

Assigns the internal state from another status object only if the current state is success.

@param rhs The status object.

func (*Status) OrDie

func (self *Status) OrDie()

Causes a panic if the status is not success.

func (*Status) Set

func (self *Status) Set(args ...interface{})

Sets the code and the message.

@param code The status code. @param message An arbitrary status message. If it is omitted, no message is set.

func (*Status) String

func (self *Status) String() string

Makes a string representing the status.

@return The string representing the status.

type StatusCode

type StatusCode int32

Type alias for the enumeration of status codes.

type StatusProto

type StatusProto struct {
	// The message code.
	Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	// The additional status message.
	Message              string   `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Status data corresponding to the Status class.

func (*StatusProto) Descriptor

func (*StatusProto) Descriptor() ([]byte, []int)

func (*StatusProto) GetCode

func (m *StatusProto) GetCode() int32

func (*StatusProto) GetMessage

func (m *StatusProto) GetMessage() string

func (*StatusProto) ProtoMessage

func (*StatusProto) ProtoMessage()

func (*StatusProto) Reset

func (m *StatusProto) Reset()

func (*StatusProto) String

func (m *StatusProto) String() string

func (*StatusProto) XXX_DiscardUnknown

func (m *StatusProto) XXX_DiscardUnknown()

func (*StatusProto) XXX_Marshal

func (m *StatusProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StatusProto) XXX_Merge

func (m *StatusProto) XXX_Merge(src proto.Message)

func (*StatusProto) XXX_Size

func (m *StatusProto) XXX_Size() int

func (*StatusProto) XXX_Unmarshal

func (m *StatusProto) XXX_Unmarshal(b []byte) error

type StreamRequest

type StreamRequest struct {
	// For each stream operation.
	//
	// Types that are valid to be assigned to RequestOneof:
	//	*StreamRequest_EchoRequest
	//	*StreamRequest_GetRequest
	//	*StreamRequest_SetRequest
	//	*StreamRequest_RemoveRequest
	//	*StreamRequest_AppendRequest
	//	*StreamRequest_CompareExchangeRequest
	//	*StreamRequest_IncrementRequest
	RequestOneof isStreamRequest_RequestOneof `protobuf_oneof:"request_oneof"`
	// If true, the response is omitted.
	OmitResponse         bool     `protobuf:"varint,101,opt,name=omit_response,json=omitResponse,proto3" json:"omit_response,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request of the Stream method.

func (*StreamRequest) Descriptor

func (*StreamRequest) Descriptor() ([]byte, []int)

func (*StreamRequest) GetAppendRequest

func (m *StreamRequest) GetAppendRequest() *AppendRequest

func (*StreamRequest) GetCompareExchangeRequest

func (m *StreamRequest) GetCompareExchangeRequest() *CompareExchangeRequest

func (*StreamRequest) GetEchoRequest

func (m *StreamRequest) GetEchoRequest() *EchoRequest

func (*StreamRequest) GetGetRequest

func (m *StreamRequest) GetGetRequest() *GetRequest

func (*StreamRequest) GetIncrementRequest

func (m *StreamRequest) GetIncrementRequest() *IncrementRequest

func (*StreamRequest) GetOmitResponse

func (m *StreamRequest) GetOmitResponse() bool

func (*StreamRequest) GetRemoveRequest

func (m *StreamRequest) GetRemoveRequest() *RemoveRequest

func (*StreamRequest) GetRequestOneof

func (m *StreamRequest) GetRequestOneof() isStreamRequest_RequestOneof

func (*StreamRequest) GetSetRequest

func (m *StreamRequest) GetSetRequest() *SetRequest

func (*StreamRequest) ProtoMessage

func (*StreamRequest) ProtoMessage()

func (*StreamRequest) Reset

func (m *StreamRequest) Reset()

func (*StreamRequest) String

func (m *StreamRequest) String() string

func (*StreamRequest) XXX_DiscardUnknown

func (m *StreamRequest) XXX_DiscardUnknown()

func (*StreamRequest) XXX_Marshal

func (m *StreamRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StreamRequest) XXX_Merge

func (m *StreamRequest) XXX_Merge(src proto.Message)

func (*StreamRequest) XXX_OneofWrappers

func (*StreamRequest) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*StreamRequest) XXX_Size

func (m *StreamRequest) XXX_Size() int

func (*StreamRequest) XXX_Unmarshal

func (m *StreamRequest) XXX_Unmarshal(b []byte) error

type StreamRequest_AppendRequest

type StreamRequest_AppendRequest struct {
	AppendRequest *AppendRequest `protobuf:"bytes,5,opt,name=append_request,json=appendRequest,proto3,oneof"`
}

type StreamRequest_CompareExchangeRequest

type StreamRequest_CompareExchangeRequest struct {
	CompareExchangeRequest *CompareExchangeRequest `protobuf:"bytes,6,opt,name=compare_exchange_request,json=compareExchangeRequest,proto3,oneof"`
}

type StreamRequest_EchoRequest

type StreamRequest_EchoRequest struct {
	EchoRequest *EchoRequest `protobuf:"bytes,1,opt,name=echo_request,json=echoRequest,proto3,oneof"`
}

type StreamRequest_GetRequest

type StreamRequest_GetRequest struct {
	GetRequest *GetRequest `protobuf:"bytes,2,opt,name=get_request,json=getRequest,proto3,oneof"`
}

type StreamRequest_IncrementRequest

type StreamRequest_IncrementRequest struct {
	IncrementRequest *IncrementRequest `protobuf:"bytes,7,opt,name=increment_request,json=incrementRequest,proto3,oneof"`
}

type StreamRequest_RemoveRequest

type StreamRequest_RemoveRequest struct {
	RemoveRequest *RemoveRequest `protobuf:"bytes,4,opt,name=remove_request,json=removeRequest,proto3,oneof"`
}

type StreamRequest_SetRequest

type StreamRequest_SetRequest struct {
	SetRequest *SetRequest `protobuf:"bytes,3,opt,name=set_request,json=setRequest,proto3,oneof"`
}

type StreamResponse

type StreamResponse struct {
	// Types that are valid to be assigned to ResponseOneof:
	//	*StreamResponse_EchoResponse
	//	*StreamResponse_GetResponse
	//	*StreamResponse_SetResponse
	//	*StreamResponse_RemoveResponse
	//	*StreamResponse_AppendResponse
	//	*StreamResponse_CompareExchangeResponse
	//	*StreamResponse_IncrementResponse
	ResponseOneof        isStreamResponse_ResponseOneof `protobuf_oneof:"response_oneof"`
	XXX_NoUnkeyedLiteral struct{}                       `json:"-"`
	XXX_unrecognized     []byte                         `json:"-"`
	XXX_sizecache        int32                          `json:"-"`
}

Response of the Stream method.

func (*StreamResponse) Descriptor

func (*StreamResponse) Descriptor() ([]byte, []int)

func (*StreamResponse) GetAppendResponse

func (m *StreamResponse) GetAppendResponse() *AppendResponse

func (*StreamResponse) GetCompareExchangeResponse

func (m *StreamResponse) GetCompareExchangeResponse() *CompareExchangeResponse

func (*StreamResponse) GetEchoResponse

func (m *StreamResponse) GetEchoResponse() *EchoResponse

func (*StreamResponse) GetGetResponse

func (m *StreamResponse) GetGetResponse() *GetResponse

func (*StreamResponse) GetIncrementResponse

func (m *StreamResponse) GetIncrementResponse() *IncrementResponse

func (*StreamResponse) GetRemoveResponse

func (m *StreamResponse) GetRemoveResponse() *RemoveResponse

func (*StreamResponse) GetResponseOneof

func (m *StreamResponse) GetResponseOneof() isStreamResponse_ResponseOneof

func (*StreamResponse) GetSetResponse

func (m *StreamResponse) GetSetResponse() *SetResponse

func (*StreamResponse) ProtoMessage

func (*StreamResponse) ProtoMessage()

func (*StreamResponse) Reset

func (m *StreamResponse) Reset()

func (*StreamResponse) String

func (m *StreamResponse) String() string

func (*StreamResponse) XXX_DiscardUnknown

func (m *StreamResponse) XXX_DiscardUnknown()

func (*StreamResponse) XXX_Marshal

func (m *StreamResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StreamResponse) XXX_Merge

func (m *StreamResponse) XXX_Merge(src proto.Message)

func (*StreamResponse) XXX_OneofWrappers

func (*StreamResponse) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*StreamResponse) XXX_Size

func (m *StreamResponse) XXX_Size() int

func (*StreamResponse) XXX_Unmarshal

func (m *StreamResponse) XXX_Unmarshal(b []byte) error

type StreamResponse_AppendResponse

type StreamResponse_AppendResponse struct {
	AppendResponse *AppendResponse `protobuf:"bytes,5,opt,name=append_response,json=appendResponse,proto3,oneof"`
}

type StreamResponse_CompareExchangeResponse

type StreamResponse_CompareExchangeResponse struct {
	CompareExchangeResponse *CompareExchangeResponse `protobuf:"bytes,6,opt,name=compare_exchange_response,json=compareExchangeResponse,proto3,oneof"`
}

type StreamResponse_EchoResponse

type StreamResponse_EchoResponse struct {
	EchoResponse *EchoResponse `protobuf:"bytes,1,opt,name=echo_response,json=echoResponse,proto3,oneof"`
}

type StreamResponse_GetResponse

type StreamResponse_GetResponse struct {
	GetResponse *GetResponse `protobuf:"bytes,2,opt,name=get_response,json=getResponse,proto3,oneof"`
}

type StreamResponse_IncrementResponse

type StreamResponse_IncrementResponse struct {
	IncrementResponse *IncrementResponse `protobuf:"bytes,7,opt,name=increment_response,json=incrementResponse,proto3,oneof"`
}

type StreamResponse_RemoveResponse

type StreamResponse_RemoveResponse struct {
	RemoveResponse *RemoveResponse `protobuf:"bytes,4,opt,name=remove_response,json=removeResponse,proto3,oneof"`
}

type StreamResponse_SetResponse

type StreamResponse_SetResponse struct {
	SetResponse *SetResponse `protobuf:"bytes,3,opt,name=set_response,json=setResponse,proto3,oneof"`
}

type StringPair

type StringPair struct {
	// The first value, aka. record key.
	First string `protobuf:"bytes,1,opt,name=first,proto3" json:"first,omitempty"`
	// The second value aka. record value.
	Second               string   `protobuf:"bytes,2,opt,name=second,proto3" json:"second,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Generic key-value pair of strings.

func (*StringPair) Descriptor

func (*StringPair) Descriptor() ([]byte, []int)

func (*StringPair) GetFirst

func (m *StringPair) GetFirst() string

func (*StringPair) GetSecond

func (m *StringPair) GetSecond() string

func (*StringPair) ProtoMessage

func (*StringPair) ProtoMessage()

func (*StringPair) Reset

func (m *StringPair) Reset()

func (*StringPair) String

func (m *StringPair) String() string

func (*StringPair) XXX_DiscardUnknown

func (m *StringPair) XXX_DiscardUnknown()

func (*StringPair) XXX_Marshal

func (m *StringPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StringPair) XXX_Merge

func (m *StringPair) XXX_Merge(src proto.Message)

func (*StringPair) XXX_Size

func (m *StringPair) XXX_Size() int

func (*StringPair) XXX_Unmarshal

func (m *StringPair) XXX_Unmarshal(b []byte) error

type SynchronizeRequest

type SynchronizeRequest struct {
	// The index of the DBM object.  The origin is 0.
	DbmIndex int32 `protobuf:"varint,1,opt,name=dbm_index,json=dbmIndex,proto3" json:"dbm_index,omitempty"`
	// Whether to do physical synchronization.
	Hard bool `protobuf:"varint,2,opt,name=hard,proto3" json:"hard,omitempty"`
	// Optional parameters.
	Params               []*StringPair `protobuf:"bytes,3,rep,name=params,proto3" json:"params,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

Request of the Synchronize method.

func (*SynchronizeRequest) Descriptor

func (*SynchronizeRequest) Descriptor() ([]byte, []int)

func (*SynchronizeRequest) GetDbmIndex

func (m *SynchronizeRequest) GetDbmIndex() int32

func (*SynchronizeRequest) GetHard

func (m *SynchronizeRequest) GetHard() bool

func (*SynchronizeRequest) GetParams

func (m *SynchronizeRequest) GetParams() []*StringPair

func (*SynchronizeRequest) ProtoMessage

func (*SynchronizeRequest) ProtoMessage()

func (*SynchronizeRequest) Reset

func (m *SynchronizeRequest) Reset()

func (*SynchronizeRequest) String

func (m *SynchronizeRequest) String() string

func (*SynchronizeRequest) XXX_DiscardUnknown

func (m *SynchronizeRequest) XXX_DiscardUnknown()

func (*SynchronizeRequest) XXX_Marshal

func (m *SynchronizeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SynchronizeRequest) XXX_Merge

func (m *SynchronizeRequest) XXX_Merge(src proto.Message)

func (*SynchronizeRequest) XXX_Size

func (m *SynchronizeRequest) XXX_Size() int

func (*SynchronizeRequest) XXX_Unmarshal

func (m *SynchronizeRequest) XXX_Unmarshal(b []byte) error

type SynchronizeResponse

type SynchronizeResponse struct {
	// The result status.
	Status               *StatusProto `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

Response of the Synchronize method.

func (*SynchronizeResponse) Descriptor

func (*SynchronizeResponse) Descriptor() ([]byte, []int)

func (*SynchronizeResponse) GetStatus

func (m *SynchronizeResponse) GetStatus() *StatusProto

func (*SynchronizeResponse) ProtoMessage

func (*SynchronizeResponse) ProtoMessage()

func (*SynchronizeResponse) Reset

func (m *SynchronizeResponse) Reset()

func (*SynchronizeResponse) String

func (m *SynchronizeResponse) String() string

func (*SynchronizeResponse) XXX_DiscardUnknown

func (m *SynchronizeResponse) XXX_DiscardUnknown()

func (*SynchronizeResponse) XXX_Marshal

func (m *SynchronizeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SynchronizeResponse) XXX_Merge

func (m *SynchronizeResponse) XXX_Merge(src proto.Message)

func (*SynchronizeResponse) XXX_Size

func (m *SynchronizeResponse) XXX_Size() int

func (*SynchronizeResponse) XXX_Unmarshal

func (m *SynchronizeResponse) XXX_Unmarshal(b []byte) error

type UnimplementedDBMServiceServer

type UnimplementedDBMServiceServer struct {
}

UnimplementedDBMServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedDBMServiceServer) Append

func (UnimplementedDBMServiceServer) AppendMulti

func (UnimplementedDBMServiceServer) ChangeMaster

func (UnimplementedDBMServiceServer) Clear

func (UnimplementedDBMServiceServer) CompareExchange

func (UnimplementedDBMServiceServer) Count

func (UnimplementedDBMServiceServer) Echo

func (UnimplementedDBMServiceServer) Get

func (UnimplementedDBMServiceServer) GetFileSize

func (UnimplementedDBMServiceServer) GetMulti

func (UnimplementedDBMServiceServer) Increment

func (UnimplementedDBMServiceServer) Inspect

func (UnimplementedDBMServiceServer) Iterate

func (UnimplementedDBMServiceServer) PopFirst

func (UnimplementedDBMServiceServer) PushLast

func (UnimplementedDBMServiceServer) Rebuild

func (UnimplementedDBMServiceServer) Rekey

func (UnimplementedDBMServiceServer) Remove

func (UnimplementedDBMServiceServer) RemoveMulti

func (UnimplementedDBMServiceServer) Replicate

func (UnimplementedDBMServiceServer) Search

func (UnimplementedDBMServiceServer) Set

func (UnimplementedDBMServiceServer) SetMulti

func (UnimplementedDBMServiceServer) ShouldBeRebuilt

func (UnimplementedDBMServiceServer) Stream

func (UnimplementedDBMServiceServer) Synchronize

type UnsafeDBMServiceServer

type UnsafeDBMServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeDBMServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DBMServiceServer will result in compilation errors.

Directories

Path Synopsis
example1 module
example2 module
perf module
wicked module

Jump to

Keyboard shortcuts

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