Documentation
¶
Index ¶
- type IDateRangeFacet
- type IDocument
- type IFacet
- type IIndexStorage
- type IIndexStorageSearchResult
- type INodeConfiguration
- type INumericRangeFacet
- type IOnDiskClusterConfiguration
- type IPasswordHashAlgorithm
- type IPasswordHashAlgorithmFactory
- type IRaftConfiguration
- type IReader
- type IReaderWriter
- type ISearchResponse
- type IStateContext
- type IStateIterator
- type IStateStorage
- type IStateStorageIterator
- type IStateStorageTransaction
- type IStorage
- type IStorageConfiguration
- type IStoraged
- type IStoragedConfiguration
- type ITerm
- type ITransactionProcessor
- type IWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IDateRangeFacet ¶
type IFacet ¶
type IFacet interface { Name() string Field() string Total() int Missing() int Other() int Terms() []ITerm NumericRanges() []INumericRangeFacet DateRanges() []IDateRangeFacet }
type IIndexStorage ¶
type IIndexStorage interface { RunGC() Close() error IndexStorageName() string Open(path string, secretKey []byte, configuration interface{}) error DefaultIndexMeta(namespace string) error UpsertIndexMeta(meta *pb.IndexMeta) error DeleteIndexMeta(meta *pb.IndexMeta) error CustomIndexRule(namespace string, indexRule interface{}) error CanIndex(namespace string) bool ApplyIndex(namespace string, data []*variant.IndexData) error GlobalSearch(ctx context.Context, input *pb.GlobalSearchInput) (IIndexStorageSearchResult, error) }
type IIndexStorageSearchResult ¶
type IIndexStorageSearchResult interface { RawResult() interface{} ToMap() map[string]interface{} ToBytes() []byte ToSearchResponse() ISearchResponse }
type INodeConfiguration ¶
type INodeConfiguration interface { /*Dragonboat NodeHostConfig*/ DeploymentID() uint64 WALDir() string NodeHostDir() string RTTMillisecond() uint64 RaftAddress() string ListenAddress() string MutualTLS() bool CAFile() string CertFile() string KeyFile() string MaxSendQueueSize() uint64 MaxReceiveQueueSize() uint64 EnableMetrics() bool MaxSnapshotSendBytesPerSecond() uint64 MaxSnapshotRecvBytesPerSecond() uint64 LogDBFactory() config.LogDBFactoryFunc RaftRPCFactory() config.RaftRPCFactoryFunc NotifyCommit() bool LogDB() config.LogDBConfig SystemTickerPrecision() time.Duration RaftEventListener() raftio.IRaftEventListener SystemEventListener() raftio.ISystemEventListener }
type INumericRangeFacet ¶
type IOnDiskClusterConfiguration ¶
type IOnDiskClusterConfiguration interface { // Join defines the join flag for on disk cluster // configuration Join() bool // ClusterID method contains cluster id ClusterID() uint64 // ClusterName method contains cluster name ClusterName() string // InitialMembers method defines all initial members of the cluster InitialMembers() map[uint64]string // StateMachine method return a method which returns storaged state machine StateMachine(IStoragedConfiguration) func(uint64, uint64) IStoraged }
IOnDiskClusterConfiguration interface defines on disk cluster configuration
type IPasswordHashAlgorithm ¶
type IRaftConfiguration ¶
type IRaftConfiguration interface { NodeID() uint64 CheckQuorum() bool ElectionRTT() uint64 HeartbeatRTT() uint64 SnapshotEntries() uint64 CompactionOverhead() uint64 OrderedConfigChange() bool MaxInMemLogSize() uint64 //SnapshotCompressionType() string //EntryCompressionType() string DisableAutoCompactions() bool IsObserver() bool IsWitness() bool Quiesce() bool }
type IReaderWriter ¶
type ISearchResponse ¶
type IStateContext ¶
type IStateContext interface { GetForwardIterator() IStateIterator GetReverseIterator() IStateIterator GetKeyOnlyForwardIterator() IStateIterator GetKeyOnlyReverseIterator() IStateIterator GetState(address []byte) (*pb.StateEntry, error) UpsertState(address []byte, entry *pb.StateEntry) error DeleteState(address []byte) error UpsertIndex(id string, data interface{}) error DeleteIndex(id string) error //AutoIndexMeta() bool //CanIndex(namespace string) bool UpsertIndexMeta(meta *pb.IndexMeta) error DeleteIndexMeta(meta *pb.IndexMeta) error DefaultIndexMeta(namespace string) error }
type IStateIterator ¶
type IStateStorage ¶
type IStateStorage interface { RunGC() Open() error Close() error StateStorageName() string NewTransaction() IStateStorageTransaction NewReadOnlyTransaction() IStateStorageTransaction Setup(path string, secretKey []byte, configuration interface{}) ChangeSecretKey(path string, oldSecretKey []byte, newSecretKey []byte, encryptionKeyRotationDuration time.Duration) error }
type IStateStorageIterator ¶
type IStateStorageTransaction ¶
type IStateStorageTransaction interface { Discard() Commit() error Delete(address []byte) error Get(address []byte) ([]byte, error) Set(address []byte, data []byte) error ForwardIterator() IStateStorageIterator ReverseIterator() IStateStorageIterator KeyOnlyForwardIterator() IStateStorageIterator KeyOnlyReverseIterator() IStateStorageIterator }
type IStorage ¶
type IStorage interface { RunGC() Open() error Close() error SetConfiguration(configuration IStorageConfiguration) bool ChangeSecretKey(path string, oldSecretKey []byte, newSecretKey []byte, encryptionKeyRotationDuration time.Duration) error PrepareSnapshot() (interface{}, error) RecoverFromSnapshot(r io.Reader) error SaveSnapshot(snapshotContext interface{}, w io.Writer) error SaveAppliedIndex(u uint64) error QueryAppliedIndex() (uint64, error) GetAppliedIndex(ctx context.Context) (interface{}, error) Search(ctx context.Context, search *pb.SearchInput) (interface{}, error) Iterate(ctx context.Context, iterate *pb.IterateInput) (interface{}, error) Retrieve(ctx context.Context, retrieve *pb.RetrieveInput) (interface{}, error) GlobalSearch(ctx context.Context, globalSearch *pb.GlobalSearchInput) (interface{}, error) GlobalIterate(ctx context.Context, globalIterate *pb.GlobalIterateInput) (interface{}, error) GlobalRetrieve(ctx context.Context, globalRetrieve *pb.GlobalRetrieveInput) (interface{}, error) ApplyProposal(ctx context.Context, proposal *pb.Proposal, entryIndex uint64) *pb.ProposalResponse UpsertIndexMeta(meta *pb.IndexMeta) error DeleteIndexMeta(meta *pb.IndexMeta) error CanIndex(namespace string) bool IndexEnable() bool AutoIndexMeta() bool DefaultIndexMeta(namespace string) error CustomIndexRule(namespace string, indexRule interface{}) error }
type IStorageConfiguration ¶
type IStorageConfiguration interface { /*Storage Config*/ CacheSize() int BatchSize() int QueueSize() int IndexEnable() bool AutoIndexMeta() bool AutoBuildIndex() bool StorageTaskQueue() variant.TaskQueue StateStoragePath() string StateStorageSecretKey() []byte IndexStoragePath() string IndexStorageSecretKey() []byte StoragePluginState() IStateStorage StoragePluginIndex() IIndexStorage StateStorageCustomConfiguration() interface{} IndexStorageCustomConfiguration() interface{} AddTransactionProcessor(tp ITransactionProcessor) IsTransactionProcessorExists(family, version string) bool GetTransactionProcessor(family, version string) ITransactionProcessor ProposalReceiver(proposal *pb.Proposal, status pb.Status) }
type IStoraged ¶
type IStoraged interface { Sync() error Close() error Open(<-chan struct{}) (uint64, error) Update(entries []sm.Entry) ([]sm.Entry, error) Lookup(input interface{}) (interface{}, error) SetConfiguration(configuration IStoragedConfiguration) bool PrepareSnapshot() (interface{}, error) SaveSnapshot(snapshotContext interface{}, w io.Writer, done <-chan struct{}) error RecoverFromSnapshot(r io.Reader, done <-chan struct{}) error }
type IStoragedConfiguration ¶
type IStoragedConfiguration interface { IStorageConfiguration }
type ITransactionProcessor ¶
type ITransactionProcessor interface { FamilyName() string FamilyVersion() string IndexObject(statePayload []byte) interface{} Search(ctx context.Context, readOnlyStateContext IStateContext, searchInput *pb.SearchInput) (interface{}, error) Iterate(ctx context.Context, readOnlyStateContext IStateContext, iterateInput *pb.IterateInput) (interface{}, error) Retrieve(ctx context.Context, readOnlyStateContext IStateContext, retrieveInput *pb.RetrieveInput) (interface{}, error) Apply(ctx context.Context, stateContext IStateContext, transaction *pb.Transaction) *pb.TransactionResponse }
Click to show internal directories.
Click to hide internal directories.