storagecluster

package
v1.1.0-alpha-3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterClient

type ClusterClient struct {
	// contains filtered or unexported fields
}

ClusterClient contains the cluster configuration, which gets reloaded based on incoming SIGHUP signals.

func NewClusterClient

func NewClusterClient(cfg ClusterClientConfig, logger log.Logger) (*ClusterClient, error)

NewClusterClient creates a new cluster client

func (*ClusterClient) Close

func (cc *ClusterClient) Close()

Close the open listen goroutine, which autoreloads the internal configuration, upon receiving a SIGHUP signal.

func (*ClusterClient) ConnectionConfig

func (cc *ClusterClient) ConnectionConfig(index int64) (*config.StorageServerConfig, error)

ConnectionConfig returns a connection config, based on a given index, which will be morphed into a local index, based on the available (local) storage servers available.

func (*ClusterClient) MetaConnectionConfig

func (cc *ClusterClient) MetaConnectionConfig() (*config.StorageServerConfig, error)

MetaConnectionConfig returns the connection config, used to connect to the meta storage server.

func (*ClusterClient) RootConnectionConfig

func (cc *ClusterClient) RootConnectionConfig(index int64) (*config.StorageServerConfig, error)

RootConnectionConfig returns the root connection config, if available

type ClusterClientConfig

type ClusterClientConfig struct {
	ConfigPath         string
	VdiskID            string
	StorageClusterName string
}

ClusterClientConfig contains all configurable parameters used when creating a ClusterClient

type ClusterClientFactory

type ClusterClientFactory struct {
	// contains filtered or unexported fields
}

ClusterClientFactory allows for the creation of ClusterClients.

func NewClusterClientFactory

func NewClusterClientFactory(configPath string, logger log.Logger) (*ClusterClientFactory, error)

NewClusterClientFactory creates a ClusterClientFactory.

func (*ClusterClientFactory) Listen

func (f *ClusterClientFactory) Listen(ctx context.Context)

Listen to incoming creation requests (send by the NewClient method)

func (*ClusterClientFactory) NewClient

func (f *ClusterClientFactory) NewClient(vdiskID string) (cc *ClusterClient, err error)

NewClient returns a new ClusterClient.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL