pgx

package
v0.0.0-...-0303aaf Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound      = fmt.Errorf("not found")
	ErrAlreadyExists = fmt.Errorf("already exists")
)

Functions

This section is empty.

Types

type Datastore

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

func NewDatastore

func NewDatastore(opt ...DatastoreOption) (*Datastore, error)

func (*Datastore) CreateAgent

func (a *Datastore) CreateAgent(ctx context.Context, agent *metadatastore.Agent) (int32, error)

func (*Datastore) CreatePartition

func (a *Datastore) CreatePartition(ctx context.Context, partition *metadatastore.Partition) error

func (*Datastore) CreateTopic

func (a *Datastore) CreateTopic(ctx context.Context, topic *metadatastore.Topic) error

func (*Datastore) DeleteAgent

func (a *Datastore) DeleteAgent(ctx context.Context, agentID int32) error

func (*Datastore) DeletePartition

func (a *Datastore) DeletePartition(ctx context.Context, partitionID string) error

func (*Datastore) DeleteTopic

func (a *Datastore) DeleteTopic(ctx context.Context, topicID string) error

func (*Datastore) GracefulStop

func (a *Datastore) GracefulStop()

func (*Datastore) ReadAgent

func (a *Datastore) ReadAgent(ctx context.Context, agentID int32) (*metadatastore.Agent, error)

func (*Datastore) ReadAllAgents

func (a *Datastore) ReadAllAgents(ctx context.Context) ([]*metadatastore.Agent, error)

func (*Datastore) ReadAllPartitions

func (a *Datastore) ReadAllPartitions(ctx context.Context) ([]*metadatastore.Partition, error)

func (*Datastore) ReadAllTopics

func (a *Datastore) ReadAllTopics(ctx context.Context) ([]*metadatastore.Topic, error)

func (*Datastore) ReadPartition

func (a *Datastore) ReadPartition(ctx context.Context, partitionID string) (*metadatastore.Partition, error)

func (*Datastore) ReadTopic

func (a *Datastore) ReadTopic(ctx context.Context, topicID string) (*metadatastore.Topic, error)

func (*Datastore) RoundRobinForAz

func (a *Datastore) RoundRobinForAz(ctx context.Context, az string, liveAgents int) (int, error)

func (*Datastore) TouchAgent

func (a *Datastore) TouchAgent(ctx context.Context, agentID int32) error

func (*Datastore) UpdateAgent

func (a *Datastore) UpdateAgent(ctx context.Context, agent *metadatastore.Agent) error

func (*Datastore) UpdatePartition

func (a *Datastore) UpdatePartition(ctx context.Context, partition *metadatastore.Partition) error

func (*Datastore) UpdateTopic

func (a *Datastore) UpdateTopic(ctx context.Context, topic *metadatastore.Topic) error

type DatastoreOption

type DatastoreOption interface {
	// contains filtered or unexported methods
}

func WithDatastoreConnectionString

func WithDatastoreConnectionString(connString string) DatastoreOption

Jump to

Keyboard shortcuts

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