Documentation ¶
Index ¶
- Constants
- Variables
- func NewGrpcServiceWith(server *Server) *gRPCService
- type Client
- func (client *Client) Check() (bool, error)
- func (client *Client) Close() error
- func (client *Client) CreateDatabase(name string) error
- func (client *Client) GetConfig(name string) (string, error)
- func (client *Client) GetMetric(name string) (string, error)
- func (client *Client) GetVersion() (string, error)
- func (client *Client) ListConfig() ([]string, error)
- func (client *Client) ListDatabases() ([]string, error)
- func (client *Client) ListMetric() ([]string, error)
- func (client *Client) Open() error
- func (client *Client) RemoveDatabase(name string) error
- func (client *Client) SetHost(host string)
- func (client *Client) SetPort(port int)
- type Config
- func NewConfig() (*Config, error)
- func NewConfigWith(conf config.Config) *Config
- func NewConfigWithFile(confFile string) (*Config, error)
- func NewConfigWithPath(path string) (*Config, error)
- func NewConfigWithPaths(paths ...string) (*Config, error)
- func NewConfigWithString(conString string) (*Config, error)
- func NewDefaultConfig() (*Config, error)
- type PluginManager
- func (mgr *PluginManager) CoordinatorServices() ([]coordinator.Service, error)
- func (mgr *PluginManager) DefaultCoordinatorService() (coordinator.Service, error)
- func (mgr *PluginManager) DefaultDocumentCoderService() (document.Service, error)
- func (mgr *PluginManager) DefaultKeyCoderService() (key.Service, error)
- func (mgr *PluginManager) DefaultKvCacheStoreService() (kvcache.Service, error)
- func (mgr *PluginManager) DefaultKvStoreService() (kv.Service, error)
- func (mgr *PluginManager) DefaultStoreService() (store.Service, error)
- func (mgr *PluginManager) DefaultTracingService() (tracer.Service, error)
- func (mgr *PluginManager) DocumentCoderServices() ([]document.Service, error)
- func (mgr *PluginManager) DocumentStoreServices() ([]store.Service, error)
- func (mgr *PluginManager) EnabledCoordinatorServices() []coordinator.Service
- func (mgr *PluginManager) EnabledDocumentCoderServices() []document.Service
- func (mgr *PluginManager) EnabledDocumentStoreServices() []store.Service
- func (mgr *PluginManager) EnabledKeyCoderServices() []key.Service
- func (mgr *PluginManager) EnabledKvStoreServices() []kv.Service
- func (mgr *PluginManager) EnabledTracingServices() []tracer.Service
- func (mgr *PluginManager) KeyCoderServices() ([]key.Service, error)
- func (mgr *PluginManager) KvCacheStoreServices() ([]kvcache.Service, error)
- func (mgr *PluginManager) KvStoreServices() ([]kv.Service, error)
- func (mgr *PluginManager) MetricsServices() ([]metrics.Service, error)
- func (mgr *PluginManager) QueryServices() ([]query.Service, error)
- func (mgr *PluginManager) RemoveDisabledServices(services []plugins.Service) []plugins.Service
- func (mgr *PluginManager) TracingServices() ([]tracer.Service, error)
- type Server
Constants ¶
View Source
const ( ConfigAPI = "api" ConfigPlugins = "plugins" ConfigGrpc = "grpc" ConfigQuery = "query" ConfigPort = "port" ConfigEnabled = "enabled" ConfigTracer = "tracer" ConfigLogger = "logger" ConfigDefault = "default" ConfigLevel = "level" )
View Source
const (
// DefaultGrpcPort is the default port number of the gRPC server.
DefaultGrpcPort = 50053
)
View Source
const (
// ProductName is the product name.
ProductName = "puzzledb"
)
View Source
const (
Version = "v1.0.1"
)
Variables ¶
View Source
var ( ErrNotFound = errors.New("not found") ErrInvalid = errors.New("invalid") )
Functions ¶
func NewGrpcServiceWith ¶ added in v1.0.0
func NewGrpcServiceWith(server *Server) *gRPCService
NewGrpcServiceWith returns a new GrpcServer.
Types ¶
type Client ¶ added in v0.9.0
type Client struct { Host string Port int Conn *grpc.ClientConn }
Client represens a gRPC client.
func (*Client) CreateDatabase ¶ added in v0.9.0
CreateDatabase creates a specified database.
func (*Client) GetVersion ¶ added in v0.9.0
func (*Client) ListConfig ¶ added in v0.9.0
func (*Client) ListDatabases ¶ added in v0.9.0
ListDatabases returns a list of database names.
func (*Client) ListMetric ¶ added in v0.9.0
func (*Client) RemoveDatabase ¶ added in v0.9.0
RemoveDatabase removes a specified database.
type Config ¶
func NewConfigWith ¶ added in v0.9.0
NewConfigWith returns a new configuration with the specified configuration.
func NewConfigWithFile ¶ added in v0.9.0
NewConfigWithFile returns a new configuration with the specified file.
func NewConfigWithPath ¶
NewConfigWithPath returns a new configuration with the specified path.
func NewConfigWithPaths ¶ added in v0.9.0
func NewConfigWithString ¶
NewConfigWithString returns a new configuration with the specified string.
func NewDefaultConfig ¶ added in v0.9.0
type PluginManager ¶ added in v0.9.0
func NewPluginManagerWith ¶ added in v0.9.0
func NewPluginManagerWith(mgr *plugins.Manager) *PluginManager
func (*PluginManager) CoordinatorServices ¶ added in v0.9.0
func (mgr *PluginManager) CoordinatorServices() ([]coordinator.Service, error)
func (*PluginManager) DefaultCoordinatorService ¶ added in v0.9.0
func (mgr *PluginManager) DefaultCoordinatorService() (coordinator.Service, error)
func (*PluginManager) DefaultDocumentCoderService ¶ added in v0.9.0
func (mgr *PluginManager) DefaultDocumentCoderService() (document.Service, error)
func (*PluginManager) DefaultKeyCoderService ¶ added in v0.9.0
func (mgr *PluginManager) DefaultKeyCoderService() (key.Service, error)
func (*PluginManager) DefaultKvCacheStoreService ¶ added in v1.0.0
func (mgr *PluginManager) DefaultKvCacheStoreService() (kvcache.Service, error)
func (*PluginManager) DefaultKvStoreService ¶ added in v0.9.0
func (mgr *PluginManager) DefaultKvStoreService() (kv.Service, error)
func (*PluginManager) DefaultStoreService ¶ added in v0.9.0
func (mgr *PluginManager) DefaultStoreService() (store.Service, error)
func (*PluginManager) DefaultTracingService ¶ added in v1.0.0
func (mgr *PluginManager) DefaultTracingService() (tracer.Service, error)
func (*PluginManager) DocumentCoderServices ¶ added in v0.9.0
func (mgr *PluginManager) DocumentCoderServices() ([]document.Service, error)
func (*PluginManager) DocumentStoreServices ¶ added in v0.9.0
func (mgr *PluginManager) DocumentStoreServices() ([]store.Service, error)
func (*PluginManager) EnabledCoordinatorServices ¶ added in v0.9.0
func (mgr *PluginManager) EnabledCoordinatorServices() []coordinator.Service
func (*PluginManager) EnabledDocumentCoderServices ¶ added in v0.9.0
func (mgr *PluginManager) EnabledDocumentCoderServices() []document.Service
func (*PluginManager) EnabledDocumentStoreServices ¶ added in v0.9.0
func (mgr *PluginManager) EnabledDocumentStoreServices() []store.Service
func (*PluginManager) EnabledKeyCoderServices ¶ added in v0.9.0
func (mgr *PluginManager) EnabledKeyCoderServices() []key.Service
func (*PluginManager) EnabledKvStoreServices ¶ added in v0.9.0
func (mgr *PluginManager) EnabledKvStoreServices() []kv.Service
func (*PluginManager) EnabledTracingServices ¶ added in v1.0.0
func (mgr *PluginManager) EnabledTracingServices() []tracer.Service
func (*PluginManager) KeyCoderServices ¶ added in v0.9.0
func (mgr *PluginManager) KeyCoderServices() ([]key.Service, error)
func (*PluginManager) KvCacheStoreServices ¶ added in v1.0.0
func (mgr *PluginManager) KvCacheStoreServices() ([]kvcache.Service, error)
func (*PluginManager) KvStoreServices ¶ added in v0.9.0
func (mgr *PluginManager) KvStoreServices() ([]kv.Service, error)
func (*PluginManager) MetricsServices ¶ added in v1.0.0
func (mgr *PluginManager) MetricsServices() ([]metrics.Service, error)
func (*PluginManager) QueryServices ¶ added in v0.9.0
func (mgr *PluginManager) QueryServices() ([]query.Service, error)
func (*PluginManager) RemoveDisabledServices ¶ added in v0.9.0
func (mgr *PluginManager) RemoveDisabledServices(services []plugins.Service) []plugins.Service
func (*PluginManager) TracingServices ¶ added in v1.0.0
func (mgr *PluginManager) TracingServices() ([]tracer.Service, error)
type Server ¶
type Server struct { *Config *PluginManager cluster.Node // contains filtered or unexported fields }
Server represents a server instance.
func NewServerWithConfig ¶
NewServerWithConfig returns a new server instance with the specified configuradtion.
func (*Server) LoadPlugins ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.