client

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2025 License: MIT Imports: 6 Imported by: 1

Documentation

Overview

package: github.com/mitchs-dev/dislo/pkg/client

This is the client API for the Dislo service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientContext added in v1.0.3

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

Context for the client to use when connecting to the Dislo service

func NewContext

func NewContext(host string, port int, skipTls bool, instance int, clientID uuid.UUID) *ClientContext

Creates a new client ClientContext

func (*ClientContext) Create added in v1.0.3

func (c *ClientContext) Create(id, namespace, correlationID string) error

Create a new lock in the Dislo service without labels

func (*ClientContext) CreateWithLabels added in v1.0.3

func (c *ClientContext) CreateWithLabels(id, namespace string, labels []pb.Label) error

Create a new lock in the Dislo service with labels

func (*ClientContext) Delete added in v1.0.3

func (c *ClientContext) Delete(id, namespace string) error

Delete a lock in the Dislo service

func (*ClientContext) List added in v1.0.3

func (c *ClientContext) List(namespace string) ([]string, error)

Lists all locks in the Dislo service namespace

func (*ClientContext) ListWithLabels added in v1.0.3

func (c *ClientContext) ListWithLabels(namespace string, labels []pb.Label) ([]string, error)

Lists all locks in the Dislo service namespace with labels

func (*ClientContext) Lock added in v1.0.3

func (c *ClientContext) Lock(id, namespace, correlationID string) error

Lock a lock in the Dislo service

func (*ClientContext) Status added in v1.0.3

func (c *ClientContext) Status(id, namespace string) ([]pb.Lock, error)

Get the status of a lock in the Dislo service

func (*ClientContext) StatusByLabels added in v1.0.3

func (c *ClientContext) StatusByLabels(namespace string, labels []pb.Label) ([]pb.Lock, error)

Lists statuses via labels instead of ID

func (*ClientContext) Unlock added in v1.0.3

func (c *ClientContext) Unlock(id, namespace, correlationID string) error

Unlock a lock in the Dislo service

Jump to

Keyboard shortcuts

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