Documentation
¶
Overview ¶
package: github.com/mitchs-dev/dislo/pkg/client
This is the client API for the Dislo service.
Index ¶
- type ClientContext
- func (c *ClientContext) Create(id, namespace, correlationID string) error
- func (c *ClientContext) CreateWithLabels(id, namespace string, labels []pb.Label) error
- func (c *ClientContext) Delete(id, namespace string) error
- func (c *ClientContext) List(namespace string) ([]string, error)
- func (c *ClientContext) ListWithLabels(namespace string, labels []pb.Label) ([]string, error)
- func (c *ClientContext) Lock(id, namespace, correlationID string) error
- func (c *ClientContext) Status(id, namespace string) ([]pb.Lock, error)
- func (c *ClientContext) StatusByLabels(namespace string, labels []pb.Label) ([]pb.Lock, error)
- func (c *ClientContext) Unlock(id, namespace, correlationID string) error
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
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
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
Click to show internal directories.
Click to hide internal directories.