client

package
v0.0.0-...-954b90f Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyGroup = errors.New("group cannot be empty")
)

Functions

This section is empty.

Types

type ClerkClient

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

func NewClerkClient

func NewClerkClient(config ClerkServerConfig) (*ClerkClient, error)

func (*ClerkClient) CreateMember

func (c *ClerkClient) CreateMember(ctx context.Context, group string, cfg *MemberConfig) (*Member, error)

type ClerkServerConfig

type ClerkServerConfig struct {
	Address string
}

type Member

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

func (*Member) Group

func (m *Member) Group() string

func (*Member) ID

func (m *Member) ID() string

func (*Member) Partition

func (m *Member) Partition() Partition

func (*Member) Remove

func (m *Member) Remove() error

func (*Member) Start

func (m *Member) Start(c context.Context) <-chan Partition

Start function initializes the pinging. It is a blocking function

type MemberConfig

type MemberConfig struct {
	KeepAliveDuration time.Duration
}

type Partition

type Partition struct {
	Ordinal int
	Total   int
}

Jump to

Keyboard shortcuts

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