client

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Created int32 = iota
	Starting
	Ready
	Stopping
	Stopped
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	InvocationHandler    invocation.Handler
	Logger               ilogger.LogAdaptor
	ConnectionManager    *icluster.ConnectionManager
	ClusterService       *icluster.Service
	PartitionService     *icluster.PartitionService
	ViewListenerService  *icluster.ViewListenerService
	InvocationService    *invocation.Service
	InvocationFactory    *icluster.ConnectionInvocationFactory
	SerializationService *serialization.Service
	EventDispatcher      *event.DispatchService
	// contains filtered or unexported fields
}

func New

func New(config *Config) (*Client, error)

func (*Client) Name

func (c *Client) Name() string

Name returns client's name. Use config.Name to set the client name. If not set manually, an automatically generated name is used.

func (*Client) Shutdown

func (c *Client) Shutdown(ctx context.Context) error

Shutdown disconnects the client from the cluster and frees resources allocated by the client.

func (*Client) Start

func (c *Client) Start(ctx context.Context) error

func (*Client) State

func (c *Client) State() int32

type Config

type Config struct {
	Name          string
	Cluster       *cluster.Config
	Failover      *cluster.FailoverConfig
	Serialization *pubserialization.Config
	Logger        *logger.Config
	Labels        []string
	StatsEnabled  bool
	StatsPeriod   time.Duration
}

func NewConfig

func NewConfig() *Config

func (*Config) Validate

func (c *Config) Validate() error

Jump to

Keyboard shortcuts

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