Documentation
¶
Index ¶
- func StartMetrics(addr string, l logger.Logger) *http.Server
- type ImmuServer
- func (s *ImmuServer) ByIndex(ctx context.Context, index *schema.Index) (*schema.Item, error)
- func (s *ImmuServer) Consistency(ctx context.Context, index *schema.Index) (*schema.ConsistencyProof, error)
- func (s *ImmuServer) Count(ctx context.Context, prefix *schema.KeyPrefix) (*schema.ItemsCount, error)
- func (s *ImmuServer) CurrentRoot(context.Context, *empty.Empty) (*schema.Root, error)
- func (s *ImmuServer) Get(ctx context.Context, k *schema.Key) (*schema.Item, error)
- func (s *ImmuServer) GetBatch(ctx context.Context, kl *schema.KeyList) (*schema.ItemList, error)
- func (s *ImmuServer) Health(context.Context, *empty.Empty) (*schema.HealthResponse, error)
- func (s *ImmuServer) History(ctx context.Context, key *schema.Key) (*schema.ItemList, error)
- func (s *ImmuServer) Inclusion(ctx context.Context, index *schema.Index) (*schema.InclusionProof, error)
- func (s *ImmuServer) SafeGet(ctx context.Context, opts *schema.SafeGetOptions) (*schema.SafeItem, error)
- func (s *ImmuServer) SafeSet(ctx context.Context, opts *schema.SafeSetOptions) (*schema.Proof, error)
- func (s *ImmuServer) Scan(ctx context.Context, opts *schema.ScanOptions) (*schema.ItemList, error)
- func (s *ImmuServer) Set(ctx context.Context, kv *schema.KeyValue) (*schema.Index, error)
- func (s *ImmuServer) SetBatch(ctx context.Context, kvl *schema.KVList) (*schema.Index, error)
- func (s *ImmuServer) Start() (err error)
- func (s *ImmuServer) Stop() error
- func (s *ImmuServer) WithLogger(logger logger.Logger) *ImmuServer
- func (s *ImmuServer) WithOptions(options Options) *ImmuServer
- func (s *ImmuServer) WithStore(st *store.Store) *ImmuServer
- type Options
- func (o Options) Bind() string
- func (o Options) FromEnvironment() Options
- func (o Options) MetricsBind() string
- func (o Options) String() string
- func (o Options) WithAddress(address string) Options
- func (o Options) WithDbName(dbName string) Options
- func (o Options) WithDir(dir string) Options
- func (o Options) WithNetwork(network string) Options
- func (o Options) WithPort(port int) Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ImmuServer ¶
type ImmuServer struct {
Store *store.Store
Logger logger.Logger
Options Options
GrpcServer *grpc.Server
// contains filtered or unexported fields
}
func DefaultServer ¶
func DefaultServer() *ImmuServer
func (*ImmuServer) Consistency ¶
func (s *ImmuServer) Consistency(ctx context.Context, index *schema.Index) (*schema.ConsistencyProof, error)
func (*ImmuServer) Count ¶
func (s *ImmuServer) Count(ctx context.Context, prefix *schema.KeyPrefix) (*schema.ItemsCount, error)
func (*ImmuServer) CurrentRoot ¶
func (*ImmuServer) Health ¶
func (s *ImmuServer) Health(context.Context, *empty.Empty) (*schema.HealthResponse, error)
func (*ImmuServer) Inclusion ¶
func (s *ImmuServer) Inclusion(ctx context.Context, index *schema.Index) (*schema.InclusionProof, error)
func (*ImmuServer) SafeGet ¶
func (s *ImmuServer) SafeGet(ctx context.Context, opts *schema.SafeGetOptions) (*schema.SafeItem, error)
func (*ImmuServer) SafeSet ¶
func (s *ImmuServer) SafeSet(ctx context.Context, opts *schema.SafeSetOptions) (*schema.Proof, error)
func (*ImmuServer) Scan ¶
func (s *ImmuServer) Scan(ctx context.Context, opts *schema.ScanOptions) (*schema.ItemList, error)
func (*ImmuServer) Start ¶
func (s *ImmuServer) Start() (err error)
func (*ImmuServer) Stop ¶
func (s *ImmuServer) Stop() error
func (*ImmuServer) WithLogger ¶
func (s *ImmuServer) WithLogger(logger logger.Logger) *ImmuServer
func (*ImmuServer) WithOptions ¶
func (s *ImmuServer) WithOptions(options Options) *ImmuServer
func (*ImmuServer) WithStore ¶
func (s *ImmuServer) WithStore(st *store.Store) *ImmuServer
type Options ¶
type Options struct {
Dir string
Network string
Address string
Port int
MetricsPort int
DbName string
}
func DefaultOptions ¶
func DefaultOptions() Options
func (Options) FromEnvironment ¶
func (Options) MetricsBind ¶
func (Options) WithAddress ¶
func (Options) WithDbName ¶
func (Options) WithNetwork ¶
Click to show internal directories.
Click to hide internal directories.