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) (map[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
- type PluginManager
- func (mgr *PluginManager) AuthenticatorServices() ([]auth.Service, error)
- 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) EnabledAuthenticatorServices() []auth.Service
- 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) EnabledKvCacheStoreServices() []kvcache.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
- func (server *Server) IsTLSEnabled() bool
- func (server *Server) LoadPlugins() error
- func (server *Server) Restart() error
- func (server *Server) SetConfig(conf Config)
- func (server *Server) SetTLSConfig(tlsConfig *std_tls.Config)
- func (server *Server) Start() error
- func (server *Server) Stop() error
- func (server *Server) TLSConfig() (*std_tls.Config, bool)
Constants ¶
const ( ConfigAPI = "api" ConfigPlugins = "plugins" ConfigGrpc = "grpc" ConfigQuery = "query" ConfigPort = "port" ConfigEnabled = "enabled" ConfigTracer = "tracer" ConfigPprof = "pprof" ConfigLogger = "logger" ConfigDefault = "default" ConfigLevel = "level" ConfigAuth = "auth" ConfigTLS = "tls" )
const ( // PackageName is the package name. PackageName = "github.com/cybergarage/puzzledb-go" // ProductName is the product name. ProductName = "puzzledb" )
const (
// DefaultGrpcPort is the default port number of the gRPC server.
DefaultGrpcPort = 50053
)
const (
Version = "v1.3.2"
)
Variables ¶
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 ¶
Config represents a configuration interface for PuzzleDB.
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
PluginManager is a manager for plugins.
func NewPluginManagerWith ¶ added in v0.9.0
func NewPluginManagerWith(mgr *plugins.Manager) *PluginManager
NewPluginManager returns a new PluginManager.
func (*PluginManager) AuthenticatorServices ¶ added in v1.3.0
func (mgr *PluginManager) AuthenticatorServices() ([]auth.Service, error)
AuthenticatorServices returns authenticator services.
func (*PluginManager) CoordinatorServices ¶ added in v0.9.0
func (mgr *PluginManager) CoordinatorServices() ([]coordinator.Service, error)
CoordinatorServices returns coordinator services.
func (*PluginManager) DefaultCoordinatorService ¶ added in v0.9.0
func (mgr *PluginManager) DefaultCoordinatorService() (coordinator.Service, error)
DefaultCoordinatorService returns the default coordinator service.
func (*PluginManager) DefaultDocumentCoderService ¶ added in v0.9.0
func (mgr *PluginManager) DefaultDocumentCoderService() (document.Service, error)
DefaultDocumentCoderService returns the default document coder service.
func (*PluginManager) DefaultKeyCoderService ¶ added in v0.9.0
func (mgr *PluginManager) DefaultKeyCoderService() (key.Service, error)
DefaultKeyCoderService returns the default key coder service.
func (*PluginManager) DefaultKvCacheStoreService ¶ added in v1.0.0
func (mgr *PluginManager) DefaultKvCacheStoreService() (kvcache.Service, error)
DefaultKvCacheStoreService returns the default KV cache store service.
func (*PluginManager) DefaultKvStoreService ¶ added in v0.9.0
func (mgr *PluginManager) DefaultKvStoreService() (kv.Service, error)
DefaultKvStoreService returns the default KV store service.
func (*PluginManager) DefaultStoreService ¶ added in v0.9.0
func (mgr *PluginManager) DefaultStoreService() (store.Service, error)
DefaultStoreService returns the default store service.
func (*PluginManager) DefaultTracingService ¶ added in v1.0.0
func (mgr *PluginManager) DefaultTracingService() (tracer.Service, error)
DefaultTracingService returns the default tracing service.
func (*PluginManager) DocumentCoderServices ¶ added in v0.9.0
func (mgr *PluginManager) DocumentCoderServices() ([]document.Service, error)
DocumentCoderServices returns document coder services.
func (*PluginManager) DocumentStoreServices ¶ added in v0.9.0
func (mgr *PluginManager) DocumentStoreServices() ([]store.Service, error)
DocumentStoreServices returns document store services.
func (*PluginManager) EnabledAuthenticatorServices ¶ added in v1.3.0
func (mgr *PluginManager) EnabledAuthenticatorServices() []auth.Service
EnabledMetricsServices returns enabled metrics services.
func (*PluginManager) EnabledCoordinatorServices ¶ added in v0.9.0
func (mgr *PluginManager) EnabledCoordinatorServices() []coordinator.Service
EnabledCoordinatorServices returns enabled coordinator services.
func (*PluginManager) EnabledDocumentCoderServices ¶ added in v0.9.0
func (mgr *PluginManager) EnabledDocumentCoderServices() []document.Service
EnabledDocumentCoderServices returns enabled document coder services.
func (*PluginManager) EnabledDocumentStoreServices ¶ added in v0.9.0
func (mgr *PluginManager) EnabledDocumentStoreServices() []store.Service
EnabledDocumentStoreServices returns enabled document store services.
func (*PluginManager) EnabledKeyCoderServices ¶ added in v0.9.0
func (mgr *PluginManager) EnabledKeyCoderServices() []key.Service
EnabledKeyCoderServices returns enabled key coder services.
func (*PluginManager) EnabledKvCacheStoreServices ¶ added in v1.2.0
func (mgr *PluginManager) EnabledKvCacheStoreServices() []kvcache.Service
EnabledKvCacheStoreServices returns enabled KV cache store services.
func (*PluginManager) EnabledKvStoreServices ¶ added in v0.9.0
func (mgr *PluginManager) EnabledKvStoreServices() []kv.Service
EnabledKvStoreServices returns enabled KV store services.
func (*PluginManager) EnabledTracingServices ¶ added in v1.0.0
func (mgr *PluginManager) EnabledTracingServices() []tracer.Service
EnabledTracingServices returns enabled tracing services.
func (*PluginManager) KeyCoderServices ¶ added in v0.9.0
func (mgr *PluginManager) KeyCoderServices() ([]key.Service, error)
KeyCoderServices returns key coder services.
func (*PluginManager) KvCacheStoreServices ¶ added in v1.0.0
func (mgr *PluginManager) KvCacheStoreServices() ([]kvcache.Service, error)
KvCacheStoreServices returns KV cache store services.
func (*PluginManager) KvStoreServices ¶ added in v0.9.0
func (mgr *PluginManager) KvStoreServices() ([]kv.Service, error)
KvStoreServices returns KV store services.
func (*PluginManager) MetricsServices ¶ added in v1.0.0
func (mgr *PluginManager) MetricsServices() ([]metrics.Service, error)
MetricsServices returns metrics services.
func (*PluginManager) QueryServices ¶ added in v0.9.0
func (mgr *PluginManager) QueryServices() ([]query.Service, error)
QueryServices returns query services.
func (*PluginManager) RemoveDisabledServices ¶ added in v0.9.0
func (mgr *PluginManager) RemoveDisabledServices(services []plugins.Service) []plugins.Service
RemoveDisabledServices removes disabled services.
func (*PluginManager) TracingServices ¶ added in v1.0.0
func (mgr *PluginManager) TracingServices() ([]tracer.Service, error)
TracingServices returns tracing services.
type Server ¶
type Server struct { Config auth.AuthManager *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) IsTLSEnabled ¶ added in v1.3.2
IsTLSEnabled returns true if TLS is enabled.
func (*Server) LoadPlugins ¶
func (*Server) SetTLSConfig ¶ added in v1.3.1
SetTLSConfig sets a TLS configuration.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
query/mysql
nolint:gocognit
|
nolint:gocognit |
query/sql
nolint:gocognit
|
nolint:gocognit |
proto
|
|