type Client struct {
// contains filtered or unexported fields
}
func NewClient(ctx context.Context, clientConfig *client_config.ClientConfig) (*Client, error)
func (c *Client) CatchUpLsqt(catchUpTo shared.Tt, maxWaitDuration time.Duration) (shared.Lsqt, error)
CatchUpLsqt waits up to maxWaitDuration for the Lsqt to reach catchUpTo.
func (c *Client) CheckReader(ctx context.Context) (bool, error)
func (c *Client) CheckWriter(ctx context.Context) (bool, error)
func (c *Client) CommitTxn(t capi.Txn) (*cshared.WrittenTransaction, error)
func (c *Client) CommitTxnAsync(t capi.Txn) chan cshared.WriteAsyncResponse
func (c *Client) Context() context.Context
Context returns the Context.
func (c *Client) CountByIndexedQuery(q *capi.IndexedQuery, tc *shared.TemporalCoordinates) (*big.Int, bool, error)
func (c *Client) CountByIndexedQueryAsync(q *capi.IndexedQuery, tc *shared.TemporalCoordinates) chan cshared.ReadAsyncResponse
func (c *Client) Delete(ctx context.Context, objectId shared.ObjectId, lastRead shared.Tt, vtFrom shared.Vt) (*cshared.WrittenObject, error)
Delete delets a single object at the given TemporalCoordinates. It returns a WrittenObject and any error encountered.
func (c *Client) DeleteAsync(ctx context.Context, objectId shared.ObjectId, lastRead shared.Tt, vtFrom shared.Vt) chan cshared.WriteAsyncResponse
DeleteAsync deletes a single object at the given TemporalCoordinates asynchronously. It returns a channel on which the result and any error encountered will be returned.
func (c *Client) DeleteObject(ctx context.Context, object capi.Indexable, vtFrom shared.Vt) (*cshared.WrittenObject, error)
DeleteObject deletes a single object at the given TemporalCoordiates. It returns a WrittenObject and any error encountered.
func (c *Client) DeleteObjectAsync(ctx context.Context, object capi.Indexable, vtFrom shared.Vt) chan cshared.WriteAsyncResponse
DeleteObjectAsync deletes a single object at the given TemporalCoordinates asynchronously. It returns a channel on which the result and any error encountered will be returned. It differs from DeleteAsync in that it takes an object in the form of a struct{} and automatically extracts its data.
func (c *Client) Entitle(ctx context.Context, emailAddress shared.EmailAddress, fqn shared.Fqn, read cshared.ReadEntitlement, write cshared.WriteEntitlement, entitle cshared.EntitleEntitlement, vt shared.Vt, backfillTt *shared.BackfillTt) (shared.Tt, error)
Entitle sets new entitlements.
func (c *Client) ListLockedFqns(ctx context.Context) ([]shared.Fqn, error)
func (c *Client) LockFqn(ctx context.Context, fqn shared.Fqn) (shared.Tt, error)
func (c *Client) Lsqt() shared.Lsqt
Lsqt returns the Client's current Lsqt.
func (c *Client) MaxByIndexedQuery(q *capi.IndexedQuery, field shared.ProjectedFieldKey, tc *shared.TemporalCoordinates) (*big.Rat, bool, error)
func (c *Client) MaxByIndexedQueryAsync(q *capi.IndexedQuery, field shared.ProjectedFieldKey, tc *shared.TemporalCoordinates) chan cshared.ReadAsyncResponse
func (c *Client) MeanByIndexedQuery(q *capi.IndexedQuery, field shared.ProjectedFieldKey, tc *shared.TemporalCoordinates) (*big.Rat, bool, error)
func (c *Client) MeanByIndexedQueryAsync(q *capi.IndexedQuery, field shared.ProjectedFieldKey, tc *shared.TemporalCoordinates) chan cshared.ReadAsyncResponse
func (c *Client) MedianByIndexedQuery(q *capi.IndexedQuery, field shared.ProjectedFieldKey, tc *shared.TemporalCoordinates) (*big.Rat, bool, error)
func (c *Client) MedianByIndexedQueryAsync(q *capi.IndexedQuery, field shared.ProjectedFieldKey, tc *shared.TemporalCoordinates) chan cshared.ReadAsyncResponse
func (c *Client) Metrics() *cmetrics.ClientMetrics
Metrics returns the ClientMetrics.
func (c *Client) MinByIndexedQuery(q *capi.IndexedQuery, field shared.ProjectedFieldKey, tc *shared.TemporalCoordinates) (*big.Rat, bool, error)
func (c *Client) MinByIndexedQueryAsync(q *capi.IndexedQuery, field shared.ProjectedFieldKey, tc *shared.TemporalCoordinates) chan cshared.ReadAsyncResponse
func (c *Client) PercentileByIndexedQuery(q *capi.IndexedQuery, field shared.ProjectedFieldKey, p shared.Percentile, tc *shared.TemporalCoordinates) (*big.Rat, bool, error)
func (c *Client) PercentileByIndexedQueryAsync(q *capi.IndexedQuery, field shared.ProjectedFieldKey, p shared.Percentile, tc *shared.TemporalCoordinates) chan cshared.ReadAsyncResponse
func (c *Client) Put(ctx context.Context, objectId shared.ObjectId, lastRead shared.Tt, vtFrom shared.Vt, blob *shared.Blob) (*cshared.WrittenObject, error)
Put writes a single object at the given TemporalCoordinates. It returns a WrittenObject and any error encountered.
func (c *Client) PutAsync(ctx context.Context, objectId shared.ObjectId, lastRead shared.Tt, vtFrom shared.Vt, blob *shared.Blob) chan cshared.WriteAsyncResponse
PutAsync writes a single object at the given TemporalCoordinates asynchronously. It returns a channel on which the result and any error encountered will be returned.
func (c *Client) PutObject(ctx context.Context, object capi.Indexable, lastRead shared.Tt, vtFrom shared.Vt) (*cshared.WrittenObject, error)
PutObject writes a single object at the given TemporalCoordinates. It returns a WrittenObject and any error encountered. It differs from Put in that it takes an object in the form of a struct{} and automatically extracts its data and its indexes (if any).
func (c *Client) PutObjectAsync(ctx context.Context, object capi.Indexable, lastRead shared.Tt, vtFrom shared.Vt) chan cshared.WriteAsyncResponse
PutObjectAsync writes a single object at the given TemporalCoordinates asynchronously. It returns a channel on which the result and any error encountered will be returned. It differs from PutAsync in that it takes an object in the form of a struct{} and automatically extracts its data and its indexes (if any).
func (c *Client) ReadEvent(ctx context.Context, eventId shared.EventId, fqn shared.Fqn, tt shared.Tt) (shared.Event, error)
func (c *Client) ReadEventAsync(ctx context.Context, eventId shared.EventId, fqn shared.Fqn, tt shared.Tt) chan cshared.ReadAsyncResponse
func (c *Client) ReadEventForObject(ctx context.Context, ixbl capi.Indexable) (shared.Event, error)
func (c *Client) ReadEventForObjectAsync(ctx context.Context, ixbl capi.Indexable) chan cshared.ReadAsyncResponse
func (c *Client) ReadLsqt() (shared.Lsqt, error)
ReadLsqt fetches the Lsqt from a reader, sets the Client's Lsqt, and returns it and any error encountered.
func (c *Client) ReadObject(ctx context.Context, ixbl capi.Indexable, tc *shared.TemporalCoordinates) (*cshared.ReadObject, error)
func (c *Client) ReadObjectAsync(ctx context.Context, ixbl capi.Indexable, tc *shared.TemporalCoordinates) chan cshared.ReadObject
func (c *Client) ReadObjects(ctx context.Context, ixbl capi.Indexable, tc *shared.TemporalCoordinates) ([]capi.Indexable, error)
func (c *Client) ReadObjectsAsync(ctx context.Context, ixbl capi.Indexable, tc *shared.TemporalCoordinates) chan cshared.ReadAsyncResponse
ReadObjectsAsync reads 0 or more objects at the given TemporalCoordinates asynchronously. It returns a channel on which the result and any error encountered will be returned.
func (c *Client) ReadObjectsAtTt(ctx context.Context, ixbl capi.Indexable, tt shared.Tt) ([]capi.Indexable, error)
func (c *Client) ReadObjectsAtTtAsync(ctx context.Context, ixbl capi.Indexable, tt shared.Tt) chan cshared.ReadAsyncResponse
func (c *Client) ReadObjectsAtVt(ctx context.Context, ixbl capi.Indexable, tc *shared.TemporalCoordinates) ([]capi.Indexable, error)
func (c *Client) ReadObjectsAtVtAsync(ctx context.Context, ixbl capi.Indexable, tc *shared.TemporalCoordinates) chan cshared.ReadAsyncResponse
func (c *Client) ReadObjectsByEvent(ctx context.Context, event shared.Event) ([]capi.Indexable, error)
func (c *Client) ReadObjectsByEventAsync(ctx context.Context, event shared.Event) chan capi.Indexable
func (c *Client) ReadObjectsByFqn(ctx context.Context, fqn shared.Fqn, maxSeenTtFrom shared.Tt, maxSeenTimesliceId shared.TimesliceId, maxTtFrom shared.Tt, batchSize shared.BatchSize) ([]capi.Indexable, error)
func (c *Client) ReadObjectsByIndexedQuery(ctx context.Context, iq *capi.IndexedQuery, tc *shared.TemporalCoordinates) ([]capi.Indexable, error)
func (c *Client) ReadObjectsByIndexedQueryAsync(ctx context.Context, iq *capi.IndexedQuery, tc *shared.TemporalCoordinates) chan cshared.ReadAsyncResponse
func (c *Client) ReadObjectsToIndexables(ros []*cshared.ReadObject) ([]capi.Indexable, error)
func (c *Client) ReadPoint(ctx context.Context, objectId shared.ObjectId, tc *shared.TemporalCoordinates) (*cshared.ReadObject, error)
ReadPoint reads a single object at the given TemporalCoordinates. It returns a ReadObject and any error encountered.
func (c *Client) ReadPointAsync(ctx context.Context, objectId shared.ObjectId, tc *shared.TemporalCoordinates) chan cshared.ReadAsyncResponse
ReadPointAsync reads a single object at the given TemporalCoordinates asynchronously. It returns a channel on which the result and any error encountered will be returned.
func (c *Client) ReadQueueCap() int
ReadQueueCap returns the capacity of the Client's read queue.
func (c *Client) ReindexObject(ctx context.Context, ixbl capi.Indexable) (*cshared.WrittenObject, error)
func (c *Client) ReindexObjectAsync(ctx context.Context, ixbl capi.Indexable) chan cshared.WriteAsyncResponse
func (c *Client) Reinstate(ctx context.Context, objectId shared.ObjectId, lastRead shared.Tt, vtFrom shared.Vt) (*cshared.WrittenObject, error)
Reinstate delets a single object at the given TemporalCoordinates. It returns a WrittenObject and any error encountered.
func (c *Client) ReinstateAsync(ctx context.Context, objectId shared.ObjectId, lastRead shared.Tt, vtFrom shared.Vt) chan cshared.WriteAsyncResponse
ReinstateAsync writes a single object at the given TemporalCoordinates asynchronously. It returns a channel on which the result and any error encountered will be returned.
func (c *Client) ReinstateObject(ctx context.Context, object capi.Indexable, lastRead shared.Tt, vtFrom shared.Vt) (*cshared.WrittenObject, error)
ReinstateObject writes a single object at the given TemporalCoordinates. It returns a WrittenObject and any error encountered. It differs from Reinstate in that it takes an object in the form of a struct{} and automatically extracts its data and its indexes (if any).
func (c *Client) ReinstateObjectAsync(ctx context.Context, object capi.Indexable, lastRead shared.Tt, vtFrom shared.Vt) chan cshared.WriteAsyncResponse
ReinstateObjectAsync reinstates a single object at the given TemporalCoordinates asynchronously. It returns a channel on which the result and any error encountered will be returned. It differs from ReinstateAsync in that it takes an object in the form of a struct{} and automatically extracts its data.
func (c *Client) ReloadConfig(ctx context.Context) error
ReloadConfig reloads the config for the running database.
func (c *Client) ServerStatus(ctx context.Context, st cshared.ServerType) (*cshared.ServerStatus, error)
ServerStatus gets basic information from the reader or from the writer to which the client is connected.
func (c *Client) Start()
func (c *Client) StdevByIndexedQuery(q *capi.IndexedQuery, field shared.ProjectedFieldKey, tc *shared.TemporalCoordinates) (*big.Rat, bool, error)
func (c *Client) StdevByIndexedQueryAsync(q *capi.IndexedQuery, field shared.ProjectedFieldKey, tc *shared.TemporalCoordinates) chan cshared.ReadAsyncResponse
func (c *Client) SubscribeToIndexedQuery(ctx context.Context, iq *capi.IndexedQuery) (cshared.SubscriptionId, chan cshared.SubscribeResponse, error)
func (c *Client) SubscribeToObjectId(ctx context.Context, oid shared.ObjectId) (cshared.SubscriptionId, chan cshared.SubscribeResponse, error)
func (c *Client) SumByIndexedQuery(q *capi.IndexedQuery, field shared.ProjectedFieldKey, tc *shared.TemporalCoordinates) (*big.Rat, bool, error)
func (c *Client) SumByIndexedQueryAsync(q *capi.IndexedQuery, field shared.ProjectedFieldKey, tc *shared.TemporalCoordinates) chan cshared.ReadAsyncResponse
func (c *Client) UnlockFqn(ctx context.Context, fqn shared.Fqn) (shared.Tt, error)
func (c *Client) VarByIndexedQuery(q *capi.IndexedQuery, field shared.ProjectedFieldKey, tc *shared.TemporalCoordinates) (*big.Rat, bool, error)
func (c *Client) VarByIndexedQueryAsync(q *capi.IndexedQuery, field shared.ProjectedFieldKey, tc *shared.TemporalCoordinates) chan cshared.ReadAsyncResponse
func (c *Client) WriteQueueCap() int
WriteQueueCap returns the capacity of the Client's write queue.
type ReadAtFutureTtError shared.Tt
func (e ReadAtFutureTtError) Error() string