cluster

package
v0.5.8 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package cluster is a package for the cluster service for communication between nodes in the Yorkie cluster.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a client for admin service.

func Dial

func Dial(rpcAddr string, opts ...Option) (*Client, error)

Dial creates an instance of Client and dials to the admin service.

func New

func New(opts ...Option) (*Client, error)

New creates an instance of Client.

func (*Client) Close

func (c *Client) Close()

Close closes the connection to the admin service.

func (*Client) DetachDocument

func (c *Client) DetachDocument(
	ctx context.Context,
	project *types.Project,
	clientID *time.ActorID,
	docID types.ID,
	apiKey string,
	docKey key.Key,
) error

DetachDocument detaches the given document from the client.

func (*Client) Dial

func (c *Client) Dial(rpcAddr string) error

Dial dials to the admin service.

type Option

type Option func(*Options)

Option configures Options.

func WithLogger

func WithLogger(logger *zap.Logger) Option

WithLogger configures the Logger of the client.

func WithSecure

func WithSecure(isSecure bool) Option

WithSecure configures secure option of the client.

type Options

type Options struct {
	// Logger is the Logger of the client.
	Logger *zap.Logger

	// IsSecure is whether to enable the TLS connection of the client.
	IsSecure bool
}

Options configures how we set up the client.

Jump to

Keyboard shortcuts

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