Versions in this module Expand all Collapse all v0 v0.4.1 Dec 14, 2023 Changes in this version + const DefaultDir + const DefaultLogFile + var ErrClosed = errors.New("server is closed") + func LogInterceptor(s *Server) grpc.UnaryServerInterceptor + func RequirePassInterceptor(s *Server) grpc.UnaryServerInterceptor + type Logger struct + func (l *Logger) Close() error + func (l *Logger) Debug(msg string, args ...any) + func (l *Logger) Error(msg string, args ...any) + func (l *Logger) Info(msg string, args ...any) + func (l *Logger) Warn(msg string, args ...any) + type Options struct + Address string + BlockCache uint32 + Checkpoint float64 + Fsync bool + FsyncThreshold int64 + LogFile string + LogLevel string + MaxSize int64 + Password string + TlsKey string + TlsPem string + TxnLevel uint8 + Version string + func ReadOption(cfgpath string) (Options, error) + type Server struct + func NewServer(ctx context.Context, option Options) (*Server, error) + func (s *Server) Close() error + func (s *Server) Del(ctx context.Context, data *riverpb.RawData) (*riverpb.InfoResult, error) + func (s *Server) DelInBatch(ctx context.Context, opt *riverpb.BatchDelOption) (*riverpb.BatchResult, error) + func (s *Server) Exp(ctx context.Context, record *riverpb.ExpRecord) (*riverpb.InfoResult, error) + func (s *Server) Get(ctx context.Context, data *riverpb.RawData) (*riverpb.DataResult, error) + func (s *Server) Put(ctx context.Context, record *riverpb.Record) (*riverpb.InfoResult, error) + func (s *Server) PutInBatch(ctx context.Context, opt *riverpb.BatchPutOption) (*riverpb.BatchResult, error) + func (s *Server) Range(ctx context.Context, opt *riverpb.RangeOption) (*riverpb.RangeResult, error) + func (s *Server) Run() error + func (s *Server) Stat(context.Context, *emptypb.Empty) (*riverpb.Status, error) + func (s *Server) TTL(ctx context.Context, data *riverpb.RawData) (*riverpb.TTLResult, error)