A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://pkg.go.dev/github.com/kurrent-io/KurrentDB-Client-Go/kurrentdb below:

kurrentdb package - github.com/kurrent-io/KurrentDB-Client-Go/kurrentdb - Go Packages

Package kurrentdb KurrentDB gRPC client.

View Source
const (
	
	UserStreamAcl = "$userStreamAcl"
	
	SystemStreamAcl = "$systemStreamAcl"
)

This section is empty.

func ParseStreamPosition(input string) (interface{}, error)

Acl Access Control List (ACL).

func (a *Acl) AddDeleteRoles(roles ...string)

AddDeleteRoles Adds delete roles.

func (a *Acl) AddMetaReadRoles(roles ...string)

AddMetaReadRoles Adds metadata roles.

func (a *Acl) AddMetaWriteRoles(roles ...string)

AddMetaWriteRoles Adds metadata write roles.

AddReadRoles Adds read roles.

AddWriteRoles Adds write roles.

DeleteRoles Returns delete roles.

MetaReadRoles Returns metadata read roles.

MetaWriteRoles Returns metadata write roles.

ReadRoles Returns read roles.

WriteRoles Returns write roles.

type AllPosition interface {
	
}

AllPosition represents a logical position in the $all stream.

Any means the write should not conflict with anything and should always succeed.

AppendToStreamOptions options of the append stream request.

Client Represents a client to a single node. A client instance maintains a full duplex communication to KurrentDB. Many threads can use a KurrentDB client at the same time or a single thread can make many asynchronous requests.

NewClient Creates a gRPC client to a KurrentDB database.

AppendToStream Appends events to a given stream.

Close Closes a connection and cleans all its allocated resources.

CreatePersistentSubscription Creates a persistent subscription gorup on a stream.

Persistent subscriptions are special kind of subscription where the server remembers the state of the subscription. This allows for many modes of operations compared to a regular or catcup subscription where the client holds the subscription state.

CreatePersistentSubscriptionToAll Creates a persistent subscription gorup on the $all stream.

Persistent subscriptions are special kind of subscription where the server remembers the state of the subscription. This allows for many modes of operations compared to a regular or catcup subscription where the client holds the subscription state.

DeletePersistentSubscription Deletes a persistent subscription group on a stream.

DeletePersistentSubscriptionToAll Deletes a persistent subscription group on the $all stream.

DeleteStream Deletes a given stream.

Makes use of "Truncate Before". When a stream is deleted, it's "Truncate Before" is set to the stream's current last event number. When a deleted stream is read, the read will return a stream not found error. After deleting the stream, you are able to write to it again, continuing from where it left off.

GetPersistentSubscriptionInfo Gets the info for a specific persistent subscription to a stream

GetPersistentSubscriptionInfoToAll Gets the info for a specific persistent subscription to the $all stream.

GetServerVersion Returns the version of the KurrentDB node to which the client is currently connected.

GetStreamMetadata Reads the metadata for a stream.

ListAllPersistentSubscriptions Lists all persistent subscriptions regardless of which stream they are on.

ListPersistentSubscriptionsForStream Lists all persistent subscriptions of a specific stream.

ListPersistentSubscriptionsToAll Lists all persistent subscriptions specific to the $all stream.

ReadAll Reads events from the $all stream. The reading can be done forward and backward.

ReadStream Reads events from a given stream. The reading can be done forward and backward.

ReplayParkedMessages Replays the parked messages of a persistent subscription to a stream.

ReplayParkedMessagesToAll Replays the parked messages of a persistent subscription to $all.

RestartPersistentSubscriptionSubsystem Restarts the persistent subscription subsystem on the server.

SetStreamMetadata Sets the metadata for a stream.

SubscribeToAll allows you to subscribe to $all stream and receive notifications about new events added to the stream. The subscription will notify event from the starting point onward. If events already exist, the handler will be called for each event one by one until it reaches the end of the stream. From there, the server will notify the handler whenever a new event appears.

SubscribeToPersistentSubscription Connects to a persistent subscription group on a stream.

SubscribeToPersistentSubscriptionToAll Connects to a persistent subscription group to the $all stream.

SubscribeToStream allows you to subscribe to a stream and receive notifications about new events added to the stream. The subscription will notify event from the starting point onward. If events already exist, the handler will be called for each event one by one until it reaches the end of the stream. From there, the server will notify the handler whenever a new event appears.

TombstoneStream Permanently deletes a given stream by writing a Tombstone event to the end of the stream.

A Tombstone event is written to the end of the stream, permanently deleting it. The stream cannot be recreated or written to again. Tombstone events are written with the event's type "$streamDeleted". When a tombstoned stream is read, the read will return a stream deleted error.

UpdatePersistentSubscription Updates a persistent subscription group on a stream.

UpdatePersistentSubscriptionToAll Updates a persistent subscription group on the $all stream.

Configuration describes how to connect to an instance of KurrentDB.

ParseConnectionString creates a Configuration based on an EventStoreDb connection string.

ConsumerStrategy named consumer strategies for use with persistent subscriptions.

ContentType event's content type.

Credentials holds a login and a password for authenticated requests.

DeletePersistentSubscriptionOptions options of the delete persistent subscription's request.

type DeleteResult struct {
	
	Position Position
}

DeleteResult is returned on a successful stream deletion request.

DeleteStreamOptions options of the delete stream request.

Direction Read direction.

End represents the end of a stream or $all.

EndPoint is database node endpoint.

ParseEndPoint parses an endpoint string representation. For example: "{hostname}:{port}"

String Endpoint string representation.

Error main client error type.

Code returns an error code.

Err returns underlying error.

IsErrorCode checks if the error code is the same as the given one.

ErrorCode KurrentDB error code.

const (
	
	ErrorCodeUnknown ErrorCode = iota
	
	ErrorCodeUnsupportedFeature
	
	ErrorCodeDeadlineExceeded
	
	ErrorCodeUnauthenticated
	
	ErrorCodeResourceNotFound
	
	ErrorCodeResourceAlreadyExists
	
	ErrorCodeConnectionClosed
	
	ErrorCodeWrongExpectedVersion
	
	ErrorCodeAccessDenied
	
	ErrorCodeStreamDeleted
	
	ErrorCodeParsing
	
	ErrorCodeInternalClient
	
	ErrorCodeInternalServer
	
	ErrorCodeNotLeader
	
	ErrorAborted
	
	ErrorUnavailable
)

EventAppeared when KurrentDB sends an event to a persistent subscription.

EventData represents an event that will be sent to KurrentDB.

FilterType represents the type filters supported by KurrentDB.

GetPersistentSubscriptionOptions options of the get persistent subscription info request.

ListPersistentSubscriptionsOptions options of the list persistent subscription request.

LogLevel log statement level.

type LoggingFunc = func(level LogLevel, format string, args ...interface{})

LoggingFunc main logging abstraction.

ConsoleLogging will print out log statements in stdout.

NoopLogging disables logging.

NackAction persistent subscription acknowledgement error type.

NoStream means the stream being written to should not yet exist.

NodePreference indicates which order of preferred nodes for connecting to.

PersistentAllSubscriptionOptions options for most of the persistent subscription requests.

PersistentStreamSubscriptionOptions options for most of the persistent subscription requests.

type PersistentSubscription struct {
	
}

PersistentSubscription persistent subscription handle.

Ack acknowledges events have been successfully processed.

Close drops the persistent subscription and free allocated resources.

Nack acknowledges events failed processing.

Recv awaits for the next incoming persistent subscription event.

type PersistentSubscriptionConnectionInfo struct {
	
	From string `json:"from"`
	
	Username string `json:"username"`
	
	AverageItemsPerSecond float64 `json:"averageItemsPerSecond"`
	
	TotalItemsProcessed int64 `json:"totalItemsProcessed"`
	
	CountSinceLastMeasurement int64 `json:"countSinceLastMeasurement"`
	
	AvailableSlots int64 `json:"availableSlots"`
	
	InFlightMessages int64 `json:"inFlightMessages"`
	
	ConnectionName string `json:"connectionName"`
	ExtraStatistics []PersistentSubscriptionMeasurement `json:"extraStatistics"`
}

PersistentSubscriptionConnectionInfo holds an active persistent subscription connection info.

PersistentSubscriptionEvent used to handle persistent subscription notifications raised throughout its lifecycle.

PersistentSubscriptionInfo represents persistent subscription info.

type PersistentSubscriptionMeasurement struct {
	
	Key string `json:"key"`
	
	Value int64 `json:"value"`
}

PersistentSubscriptionMeasurement key-value pair of a metric and its value.

type PersistentSubscriptionSettings struct {
	
	StartFrom interface{}
	
	ResolveLinkTos bool
	ExtraStatistics bool
	
	MaxRetryCount int32
	
	CheckpointLowerBound int32
	
	CheckpointUpperBound int32
	
	MaxSubscriberCount int32
	
	LiveBufferSize int32
	
	ReadBatchSize int32
	
	HistoryBufferSize int32
	
	ConsumerStrategyName ConsumerStrategy
	
	MessageTimeout int32
	
	CheckpointAfter int32
}

PersistentSubscriptionSettings persistent subscription settings.

SubscriptionSettingsDefault returns a persistent subscription settings with default values.

type PersistentSubscriptionStats struct {
	
	AveragePerSecond int64
	
	TotalItems int64
	
	CountSinceLastMeasurement int64
	
	LastCheckpointedEventRevision *uint64
	
	LastKnownEventRevision *uint64
	
	LastCheckpointedPosition *Position
	
	LastKnownPosition *Position
	
	ReadBufferCount int64
	
	LiveBufferCount int64
	
	RetryBufferCount int64
	
	TotalInFlightMessages int64
	
	OutstandingMessagesCount int64
	
	ParkedMessagesCount int64
}

PersistentSubscriptionStats represents processing-related persistent subscription statistics.

Position transaction log position.

type ProjectionClient struct {
	
}

ReadAllOptions options of the read $all request.

type ReadStream struct {
	
}

ReadStream read stream iterator.

Close closes the iterator and release allocated resources.

Recv awaits for the next incoming event.

ReadStreamOptions options of the read stream request.

RecordedEvent represents a previously written event.

ReplayParkedMessagesOptions options of the replay parked messages request.

ResolvedEvent represents an event with a potential link.

OriginalEvent returns the event that was read or which triggered the subscription.

OriginalStreamRevision returns the stream revision of the original event.

RestartPersistentSubscriptionSubsystemOptions options of the restart persistent subscription subsystem request.

type ServerVersion struct {
	Major int
	Minor int
	Patch int
}

ServerVersion Represents the version of a KurrentDB node.

Start represents the beginning of a stream or $all.

type StreamExists struct{}

StreamExists means the stream should exist.

type StreamMetadata struct {
	
}

StreamMetadata Represents stream metadata with strongly typed properties for system values and a dictionary-like interface for custom values.

StreamMetadataFromJson deserializes a JSON byte array into a StreamMetadata object.

Acl The Access Control List of the stream (ACL).

AddCustomProperty Key-value pair of a key to JSON for user-provider metadata.

CacheControl The amount of time for which the stream head is cacheable (in seconds).

CustomProperties returns all custom properties.

CustomProperty The custom property value for the given key.

IsSystemStreamAcl Checks if the ACL is set to system default.

IsUserStreamAcl Checks if the ACL is set to users default.

MaxAge The maximum age of events allowed in the stream.

MaxCount The maximum number of events allowed in the stream.

SetAcl The Access Control List of the stream (ACL).

SetCacheControl The amount of time for which the stream head is cacheable (in seconds).

SetMaxAge The maximum age of events allowed in the stream.

SetMaxCount The maximum number of events allowed in the stream.

SetTruncateBefore The event number from which previous events can be scavenged. This is used to implement deletions of streams.

StreamAcl The Access Control List of the stream (ACL).

ToJson serializes StreamMetadata to JSON.

TruncateBefore The event number from which previous events can be scavenged. This is used to implement deletions of streams.

type StreamPosition interface {
	
}

StreamPosition represents a logical position in a stream.

type StreamRevision struct {
	Value uint64
}

StreamRevision returns a stream position at a specific event revision.

Revision returns a stream position at a specific event revision.

type StreamState interface {
	
}

StreamState the use of expected revision can be a bit tricky especially when discussing guaranties given by KurrentDB server. The KurrentDB server will assure idempotency for all requests using any value in StreamState except Any. When using Any, the KurrentDB server will do its best to assure idempotency but will not guarantee it.

SubscribeToAllOptions options of the subscribe to $all request.

SubscribeToPersistentSubscriptionOptions options of the subscribe to persistent subscription request.

SubscribeToStreamOptions options of the subscribe to stream request.

type Subscription struct {
	
}

Subscription is a subscription's handle.

Close drops the subscription and cleans up allocated resources.

Id returns subscription's id.

Recv awaits for the next incoming subscription's event.

type SubscriptionDropped struct {
	
	Error error
}

SubscriptionDropped when a subscription is dropped.

SubscriptionEvent used to handle catch-up subscription notifications raised throughout its lifecycle.

SubscriptionFilter is a filter that targets $all stream.

ExcludeSystemEventsFilter filters out event's with system's event types, i.e. event types starting with `$`.

type SubscriptionFilterOptions struct {
	MaxSearchWindow    int
	CheckpointInterval int
	SubscriptionFilter *SubscriptionFilter
}

TombstoneStreamOptions options of the tombstone stream request.

type WriteResult struct {
	CommitPosition      uint64
	PreparePosition     uint64
	NextExpectedVersion uint64
}

WriteResult ...


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4