Versions in this module Expand all Collapse all v4 v4.1.0 Jun 5, 2024 Changes in this version type StreamMetadata + func (m *StreamMetadata) CustomProperties() map[string]interface{} + func (m *StreamMetadata) CustomProperty(key string) interface{} v4.0.0 Mar 4, 2024 Changes in this version + const EventFilterType + const NoMaxSearchWindow + const StreamFilterType + const SubscriberCountUnlimited + const SystemStreamAcl + const UserStreamAcl + func ParseStreamPosition(input string) (interface{}, error) + func ParseUUIDFromInt64(most int64, least int64) (uuid.UUID, error) + func UUIDAsInt64(id uuid.UUID) (int64, int64) + type Acl struct + func (a *Acl) AddDeleteRoles(roles ...string) + func (a *Acl) AddMetaReadRoles(roles ...string) + func (a *Acl) AddMetaWriteRoles(roles ...string) + func (a *Acl) AddReadRoles(roles ...string) + func (a *Acl) AddWriteRoles(roles ...string) + func (a *Acl) DeleteRoles() []string + func (a *Acl) MetaReadRoles() []string + func (a *Acl) MetaWriteRoles() []string + func (a *Acl) ReadRoles() []string + func (a *Acl) WriteRoles() []string + type AllPosition interface + type Any struct + type AppendToStreamOptions struct + Authenticated *Credentials + Deadline *time.Duration + ExpectedRevision ExpectedRevision + RequiresLeader bool + type Client struct + func NewClient(configuration *Configuration) (*Client, error) + func (client *Client) AppendToStream(context context.Context, streamID string, opts AppendToStreamOptions, ...) (*WriteResult, error) + func (client *Client) Close() error + func (client *Client) CreatePersistentSubscription(ctx context.Context, streamName string, groupName string, ...) error + func (client *Client) CreatePersistentSubscriptionToAll(ctx context.Context, groupName string, ...) error + func (client *Client) DeletePersistentSubscription(ctx context.Context, streamName string, groupName string, ...) error + func (client *Client) DeletePersistentSubscriptionToAll(ctx context.Context, groupName string, ...) error + func (client *Client) DeleteStream(parent context.Context, streamID string, opts DeleteStreamOptions) (*DeleteResult, error) + func (client *Client) GetPersistentSubscriptionInfo(ctx context.Context, streamName string, groupName string, ...) (*PersistentSubscriptionInfo, error) + func (client *Client) GetPersistentSubscriptionInfoToAll(ctx context.Context, groupName string, ...) (*PersistentSubscriptionInfo, error) + func (client *Client) GetServerVersion() (*ServerVersion, error) + func (client *Client) GetStreamMetadata(context context.Context, streamID string, opts ReadStreamOptions) (*StreamMetadata, error) + func (client *Client) ListAllPersistentSubscriptions(ctx context.Context, options ListPersistentSubscriptionsOptions) ([]PersistentSubscriptionInfo, error) + func (client *Client) ListPersistentSubscriptionsForStream(ctx context.Context, streamName string, ...) ([]PersistentSubscriptionInfo, error) + func (client *Client) ListPersistentSubscriptionsToAll(ctx context.Context, options ListPersistentSubscriptionsOptions) ([]PersistentSubscriptionInfo, error) + func (client *Client) ReadAll(context context.Context, opts ReadAllOptions, count uint64) (*ReadStream, error) + func (client *Client) ReadStream(context context.Context, streamID string, opts ReadStreamOptions, count uint64) (*ReadStream, error) + func (client *Client) ReplayParkedMessages(ctx context.Context, streamName string, groupName string, ...) error + func (client *Client) ReplayParkedMessagesToAll(ctx context.Context, groupName string, options ReplayParkedMessagesOptions) error + func (client *Client) RestartPersistentSubscriptionSubsystem(ctx context.Context, options RestartPersistentSubscriptionSubsystemOptions) error + func (client *Client) SetStreamMetadata(context context.Context, streamID string, opts AppendToStreamOptions, ...) (*WriteResult, error) + func (client *Client) SubscribeToAll(parent context.Context, opts SubscribeToAllOptions) (*Subscription, error) + func (client *Client) SubscribeToPersistentSubscription(ctx context.Context, streamName string, groupName string, ...) (*PersistentSubscription, error) + func (client *Client) SubscribeToPersistentSubscriptionToAll(ctx context.Context, groupName string, ...) (*PersistentSubscription, error) + func (client *Client) SubscribeToStream(parent context.Context, streamID string, opts SubscribeToStreamOptions) (*Subscription, error) + func (client *Client) TombstoneStream(parent context.Context, streamID string, opts TombstoneStreamOptions) (*DeleteResult, error) + func (client *Client) UpdatePersistentSubscription(ctx context.Context, streamName string, groupName string, ...) error + func (client *Client) UpdatePersistentSubscriptionToAll(ctx context.Context, groupName string, ...) error + type Configuration struct + Address string + DefaultDeadline *time.Duration + DisableTLS bool + DiscoveryInterval int + DnsDiscover bool + GossipSeeds []*EndPoint + GossipTimeout int + KeepAliveInterval time.Duration + KeepAliveTimeout time.Duration + Logger LoggingFunc + MaxDiscoverAttempts int + NodePreference NodePreference + Password string + RootCAs *x509.CertPool + SkipCertificateVerification bool + Username string + func ParseConnectionString(connectionString string) (*Configuration, error) + type ConsumerStrategy string + const ConsumerStrategyDispatchToSingle + const ConsumerStrategyPinned + const ConsumerStrategyRoundRobin + type ContentType int + const ContentTypeBinary + const ContentTypeJson + type CreateProjectionOptions struct + Authenticated *Credentials + Deadline *time.Duration + Emit bool + RequiresLeader bool + TrackEmittedStreams bool + type Credentials struct + Login string + Password string + type DeletePersistentSubscriptionOptions struct + Authenticated *Credentials + Deadline *time.Duration + RequiresLeader bool + type DeleteProjectionOptions struct + Authenticated *Credentials + Deadline *time.Duration + DeleteCheckpointStream bool + DeleteEmittedStreams bool + DeleteStateStream bool + RequiresLeader bool + type DeleteResult struct + Position Position + type DeleteStreamOptions struct + Authenticated *Credentials + Deadline *time.Duration + ExpectedRevision ExpectedRevision + RequiresLeader bool + type Direction int + const Backwards + const Forwards + type End struct + type EndPoint struct + Host string + Port uint16 + func ParseEndPoint(s string) (*EndPoint, error) + func (e *EndPoint) String() string + type Error struct + func FromError(err error) (*Error, bool) + func (e *Error) Code() ErrorCode + func (e *Error) Err() error + func (e *Error) Error() string + func (e *Error) IsErrorCode(code ErrorCode) bool + func (e *Error) Unwrap() error + type ErrorCode int + const ErrorAborted + const ErrorCodeAccessDenied + const ErrorCodeConnectionClosed + const ErrorCodeDeadlineExceeded + const ErrorCodeInternalClient + const ErrorCodeInternalServer + const ErrorCodeNotLeader + const ErrorCodeParsing + const ErrorCodeResourceAlreadyExists + const ErrorCodeResourceNotFound + const ErrorCodeStreamDeleted + const ErrorCodeUnauthenticated + const ErrorCodeUnknown + const ErrorCodeUnsupportedFeature + const ErrorCodeWrongExpectedVersion + const ErrorUnavailable + type EventAppeared struct + Event *ResolvedEvent + RetryCount int + type EventData struct + ContentType ContentType + Data []byte + EventID uuid.UUID + EventType string + Metadata []byte + type ExpectedRevision interface + type FilterType int + type GenericProjectionOptions struct + Authenticated *Credentials + Deadline *time.Duration + RequiresLeader bool + type GetPersistentSubscriptionOptions struct + Authenticated *Credentials + Deadline *time.Duration + RequiresLeader bool + type GetResultProjectionOptions struct + Authenticated *Credentials + Deadline *time.Duration + Partition string + RequiresLeader bool + type GetStateProjectionOptions struct + Authenticated *Credentials + Deadline *time.Duration + Partition string + RequiresLeader bool + type ListPersistentSubscriptionsOptions struct + Authenticated *Credentials + Deadline *time.Duration + RequiresLeader bool + type LogLevel = string + const LogDebug + const LogError + const LogInfo + const LogWarn + type LoggingFunc = func(level LogLevel, format string, args ...interface{}) + func ConsoleLogging() LoggingFunc + func NoopLogging() LoggingFunc + type NackAction int32 + const NackActionPark + const NackActionRetry + const NackActionSkip + const NackActionStop + const NackActionUnknown + type NoStream struct + type NodePreference string + const NodePreferenceFollower + const NodePreferenceLeader + const NodePreferenceRandom + const NodePreferenceReadOnlyReplica + func (nodePreference NodePreference) String() string + type PersistentAllSubscriptionOptions struct + Authenticated *Credentials + Deadline *time.Duration + Filter *SubscriptionFilter + MaxSearchWindow int + RequiresLeader bool + Settings *PersistentSubscriptionSettings + StartFrom AllPosition + type PersistentStreamSubscriptionOptions struct + Authenticated *Credentials + Deadline *time.Duration + RequiresLeader bool + Settings *PersistentSubscriptionSettings + StartFrom StreamPosition + type PersistentSubscription struct + func (connection *PersistentSubscription) Ack(messages ...*ResolvedEvent) error + func (connection *PersistentSubscription) Close() error + func (connection *PersistentSubscription) Nack(reason string, action NackAction, messages ...*ResolvedEvent) error + func (connection *PersistentSubscription) Recv() *PersistentSubscriptionEvent + type PersistentSubscriptionConnectionInfo struct + AvailableSlots int64 + AverageItemsPerSecond float64 + ConnectionName string + CountSinceLastMeasurement int64 + ExtraStatistics []PersistentSubscriptionMeasurement + From string + InFlightMessages int64 + TotalItemsProcessed int64 + Username string + type PersistentSubscriptionEvent struct + CheckPointReached *Position + EventAppeared *EventAppeared + SubscriptionDropped *SubscriptionDropped + type PersistentSubscriptionInfo struct + Connections []PersistentSubscriptionConnectionInfo + EventSource string + GroupName string + Settings *PersistentSubscriptionSettings + Stats *PersistentSubscriptionStats + Status string + type PersistentSubscriptionMeasurement struct + Key string + Value int64 + type PersistentSubscriptionSettings struct + CheckpointAfter int32 + CheckpointLowerBound int32 + CheckpointUpperBound int32 + ConsumerStrategyName ConsumerStrategy + ExtraStatistics bool + HistoryBufferSize int32 + LiveBufferSize int32 + MaxRetryCount int32 + MaxSubscriberCount int32 + MessageTimeout int32 + ReadBatchSize int32 + ResolveLinkTos bool + StartFrom interface{} + func SubscriptionSettingsDefault() PersistentSubscriptionSettings + type PersistentSubscriptionStats struct + AveragePerSecond int64 + CountSinceLastMeasurement int64 + LastCheckpointedEventRevision *uint64 + LastCheckpointedPosition *Position + LastKnownEventRevision *uint64 + LastKnownPosition *Position + LiveBufferCount int64 + OutstandingMessagesCount int64 + ParkedMessagesCount int64 + ReadBufferCount int64 + RetryBufferCount int64 + TotalInFlightMessages int64 + TotalItems int64 + type Position struct + Commit uint64 + Prepare uint64 + type ProjectionClient struct + func NewProjectionClient(configuration *Configuration) (*ProjectionClient, error) + func NewProjectionClientFromExistingClient(client *Client) *ProjectionClient + func (client *ProjectionClient) Abort(context context.Context, name string, opts GenericProjectionOptions) error + func (client *ProjectionClient) Client() *Client + func (client *ProjectionClient) Close() error + func (client *ProjectionClient) Create(context context.Context, name string, query string, ...) error + func (client *ProjectionClient) Delete(context context.Context, name string, opts DeleteProjectionOptions) error + func (client *ProjectionClient) Disable(context context.Context, name string, opts GenericProjectionOptions) error + func (client *ProjectionClient) Enable(context context.Context, name string, opts GenericProjectionOptions) error + func (client *ProjectionClient) GetResult(context context.Context, name string, opts GetResultProjectionOptions) (*structpb.Value, error) + func (client *ProjectionClient) GetState(context context.Context, name string, opts GetStateProjectionOptions) (*structpb.Value, error) + func (client *ProjectionClient) GetStatus(context context.Context, name string, opts GenericProjectionOptions) (*ProjectionStatus, error) + func (client *ProjectionClient) ListAll(context context.Context, opts GenericProjectionOptions) ([]ProjectionStatus, error) + func (client *ProjectionClient) ListContinuous(context context.Context, opts GenericProjectionOptions) ([]ProjectionStatus, error) + func (client *ProjectionClient) Reset(context context.Context, name string, opts ResetProjectionOptions) error + func (client *ProjectionClient) RestartSubsystem(context context.Context, opts GenericProjectionOptions) error + func (client *ProjectionClient) Update(context context.Context, name string, query string, ...) error + type ProjectionStatus struct + BufferedEvents int64 + CheckpointStatus string + CoreProcessingTime int64 + EffectiveName string + Epoch int64 + EventsProcessedAfterRestart int64 + LastCheckpoint string + Mode string + Name string + PartitionsCached int32 + Position string + Progress float32 + ReadsInProgress int32 + StateReason string + Status string + Version int64 + WritePendingEventsAfterCheckpoint int32 + WritePendingEventsBeforeCheckpoint int32 + WritesInProgress int32 + type ReadAllOptions struct + Authenticated *Credentials + Deadline *time.Duration + Direction Direction + From AllPosition + RequiresLeader bool + ResolveLinkTos bool + type ReadStream struct + func (stream *ReadStream) Close() + func (stream *ReadStream) Recv() (*ResolvedEvent, error) + type ReadStreamOptions struct + Authenticated *Credentials + Deadline *time.Duration + Direction Direction + From StreamPosition + RequiresLeader bool + ResolveLinkTos bool + type RecordedEvent struct + ContentType string + CreatedDate time.Time + Data []byte + EventID uuid.UUID + EventNumber uint64 + EventType string + Position Position + StreamID string + SystemMetadata map[string]string + UserMetadata []byte + type ReplayParkedMessagesOptions struct + Authenticated *Credentials + Deadline *time.Duration + RequiresLeader bool + StopAt int + type ResetProjectionOptions struct + Authenticated *Credentials + Deadline *time.Duration + RequiresLeader bool + WriteCheckpoint bool + type ResolvedEvent struct + Commit *uint64 + Event *RecordedEvent + Link *RecordedEvent + func (resolved ResolvedEvent) OriginalEvent() *RecordedEvent + func (resolved ResolvedEvent) OriginalStreamRevision() StreamRevision + type RestartPersistentSubscriptionSubsystemOptions struct + Authenticated *Credentials + Deadline *time.Duration + RequiresLeader bool + type ServerVersion struct + Major int + Minor int + Patch int + type Start struct + type StreamExists struct + type StreamMetadata struct + func StreamMetadataFromJson(bytes []byte) (*StreamMetadata, error) + func (m *StreamMetadata) Acl() interface{} + func (m *StreamMetadata) AddCustomProperty(name string, value interface{}) + func (m *StreamMetadata) CacheControl() *time.Duration + func (m *StreamMetadata) IsSystemStreamAcl() bool + func (m *StreamMetadata) IsUserStreamAcl() bool + func (m *StreamMetadata) MaxAge() *time.Duration + func (m *StreamMetadata) MaxCount() *uint64 + func (m *StreamMetadata) SetAcl(value interface{}) + func (m *StreamMetadata) SetCacheControl(value time.Duration) + func (m *StreamMetadata) SetMaxAge(value time.Duration) + func (m *StreamMetadata) SetMaxCount(value uint64) + func (m *StreamMetadata) SetTruncateBefore(value uint64) + func (m *StreamMetadata) StreamAcl() *Acl + func (m *StreamMetadata) ToJson() ([]byte, error) + func (m *StreamMetadata) TruncateBefore() *uint64 + type StreamPosition interface + type StreamRevision struct + Value uint64 + func Revision(value uint64) StreamRevision + type SubscribeToAllOptions struct + Authenticated *Credentials + CheckpointInterval int + Deadline *time.Duration + Filter *SubscriptionFilter + From AllPosition + MaxSearchWindow int + RequiresLeader bool + ResolveLinkTos bool + type SubscribeToPersistentSubscriptionOptions struct + Authenticated *Credentials + BufferSize uint32 + Deadline *time.Duration + RequiresLeader bool + type SubscribeToStreamOptions struct + Authenticated *Credentials + Deadline *time.Duration + From StreamPosition + RequiresLeader bool + ResolveLinkTos bool + type Subscription struct + func (sub *Subscription) Close() error + func (sub *Subscription) Id() string + func (sub *Subscription) Recv() *SubscriptionEvent + type SubscriptionDropped struct + Error error + type SubscriptionEvent struct + CaughtUp *Subscription + CheckPointReached *Position + EventAppeared *ResolvedEvent + FellBehind *Subscription + SubscriptionDropped *SubscriptionDropped + type SubscriptionFilter struct + Prefixes []string + Regex string + Type FilterType + func ExcludeSystemEventsFilter() *SubscriptionFilter + type SubscriptionFilterOptions struct + CheckpointInterval int + MaxSearchWindow int + SubscriptionFilter *SubscriptionFilter + type TombstoneStreamOptions struct + Authenticated *Credentials + Deadline *time.Duration + ExpectedRevision ExpectedRevision + RequiresLeader bool + type UpdateProjectionOptions struct + Authenticated *Credentials + Deadline *time.Duration + Emit *bool + RequiresLeader bool + type WriteResult struct + CommitPosition uint64 + NextExpectedVersion uint64 + PreparePosition uint64 Other modules containing this package github.com/EventStore/EventStore-Client-Go github.com/EventStore/EventStore-Client-Go/v2 github.com/EventStore/EventStore-Client-Go/v3