Documentation ¶
Index ¶
- Constants
- func EventIDFromProto(recordedEvent *api.ReadResp_ReadEvent_RecordedEvent) uuid.UUID
- func NewGrpcClient(config Configuration) *grpcClient
- type Acl
- 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) ToMap() map[string]interface{}
- func (a *Acl) WriteRoles() []string
- type AllPosition
- type Any
- type AppendToStreamOptions
- type Client
- 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) 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
- type ConsumerStrategy
- type ContentType
- type Credentials
- type DeletePersistentSubscriptionOptions
- type DeleteResult
- type DeleteStreamOptions
- type Direction
- type End
- type EndPoint
- type Error
- type ErrorCode
- type EventAppeared
- type EventData
- type ExpectedRevision
- type FilterType
- type GetPersistentSubscriptionOptions
- type ListPersistentSubscriptionsOptions
- type LogLevel
- type LoggingFunc
- type Nack_Action
- type NoStream
- type NodePreference
- type PersistentAllSubscriptionOptions
- type PersistentStreamSubscriptionOptions
- type PersistentSubscription
- func (connection *PersistentSubscription) Ack(messages ...*ResolvedEvent) error
- func (connection *PersistentSubscription) Close() error
- func (connection *PersistentSubscription) Nack(reason string, action Nack_Action, messages ...*ResolvedEvent) error
- func (connection *PersistentSubscription) Recv() *PersistentSubscriptionEvent
- type PersistentSubscriptionConfig
- type PersistentSubscriptionConnectionInfo
- type PersistentSubscriptionEvent
- type PersistentSubscriptionInfo
- type PersistentSubscriptionInfoHttpJson
- type PersistentSubscriptionMeasurement
- type PersistentSubscriptionStats
- type PersistentSubscriptionStatus
- type Position
- type ReadAllOptions
- type ReadStream
- type ReadStreamOptions
- type RecordedEvent
- type ReplayParkedMessagesOptions
- type ResolvedEvent
- type RestartPersistentSubscriptionSubsystemOptions
- type ServerInfo
- type ServerVersion
- type Start
- type StreamExists
- type StreamMetadata
- 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) ToMap() (map[string]interface{}, error)
- func (m *StreamMetadata) TruncateBefore() *uint64
- type StreamPosition
- type StreamRevision
- type SubscribeToAllOptions
- type SubscribeToPersistentSubscriptionOptions
- type SubscribeToStreamOptions
- type Subscription
- type SubscriptionDropped
- type SubscriptionEvent
- type SubscriptionFilter
- type SubscriptionFilterOptions
- type SubscriptionSettings
- type TombstoneStreamOptions
- type WriteResult
Constants ¶
View Source
const ( SchemeDefaultPort = 2113 SchemaHostsSeparator = "," SchemeName = "esdb" SchemeNameWithDiscover = "esdb+discover" SchemePathSeparator = "/" SchemePortSeparator = ":" SchemeQuerySeparator = "?" SchemeSeparator = "://" SchemeSettingSeparator = "&" SchemeUserInfoSeparator = "@" )
View Source
const ( FEATURE_NOTHING = 0 FEATURE_BATCH_APPEND = 1 FEATURE_PERSISTENT_SUBSCRIPTION_LIST = 2 FEATURE_PERSISTENT_SUBSCRIPTION_REPLAY = 4 FEATURE_PERSISTENT_SUBSCRIPTION_RESTART_SUBSYSTEM = 8 FEATURE_PERSISTENT_SUBSCRIPTION_GET_INFO = 16 FEATURE_PERSISTENT_SUBSCRIPTION_TO_ALL = 32 FEATURE_PERSISTENT_SUBSCRIPTION_MANAGEMENT = FEATURE_PERSISTENT_SUBSCRIPTION_LIST | FEATURE_PERSISTENT_SUBSCRIPTION_GET_INFO | FEATURE_PERSISTENT_SUBSCRIPTION_RESTART_SUBSYSTEM | FEATURE_PERSISTENT_SUBSCRIPTION_REPLAY )
View Source
const ( RegularOperation operationKind = iota StreamingOperation )
View Source
const ( UserStreamAcl = "$userStreamAcl" SystemStreamAcl = "$systemStreamAcl" )
View Source
const ( EventFilterType FilterType = 0 StreamFilterType FilterType = 1 NoMaxSearchWindow int = -1 )
View Source
const ( PersistentSubscriptionStatus_NotReady = "NotReady" PersistentSubscriptionStatus_Behind = "Behind" PersistentSubscriptionStatus_OutstandingPageRequest = "OutstandingPageRequest" PersistentSubscriptionStatus_ReplayingParkedMessages = "ReplayingParkedMessages" PersistentSubscriptionStatus_Live = "Live" )
View Source
const SUBSCRIBER_COUNT_UNLIMITED = 0
Variables ¶
This section is empty.
Functions ¶
func EventIDFromProto ¶
func EventIDFromProto(recordedEvent *api.ReadResp_ReadEvent_RecordedEvent) uuid.UUID
EventIDFromProto ...
func NewGrpcClient ¶
func NewGrpcClient(config Configuration) *grpcClient
Types ¶
type Acl ¶
type Acl struct {
// contains filtered or unexported fields
}
func AclFromMap ¶
func (*Acl) AddDeleteRoles ¶
func (*Acl) AddMetaReadRoles ¶
func (*Acl) AddMetaWriteRoles ¶
func (*Acl) AddReadRoles ¶
func (*Acl) AddWriteRoles ¶
func (*Acl) DeleteRoles ¶
func (*Acl) MetaReadRoles ¶
func (*Acl) MetaWriteRoles ¶
func (*Acl) WriteRoles ¶
type AllPosition ¶
type AllPosition interface {
// contains filtered or unexported methods
}
type AppendToStreamOptions ¶
type AppendToStreamOptions struct { ExpectedRevision ExpectedRevision Authenticated *Credentials Deadline *time.Duration }
type Client ¶
type Client struct { Config *Configuration // contains filtered or unexported fields }
Client ...
func (*Client) AppendToStream ¶
func (client *Client) AppendToStream( context context.Context, streamID string, opts AppendToStreamOptions, events ...EventData, ) (*WriteResult, error)
AppendToStream ...
func (*Client) CreatePersistentSubscription ¶
func (*Client) CreatePersistentSubscriptionToAll ¶
func (*Client) DeletePersistentSubscription ¶
func (*Client) DeletePersistentSubscriptionToAll ¶
func (*Client) DeleteStream ¶
func (client *Client) DeleteStream( parent context.Context, streamID string, opts DeleteStreamOptions, ) (*DeleteResult, error)
DeleteStream ...
func (*Client) GetPersistentSubscriptionInfo ¶
func (client *Client) GetPersistentSubscriptionInfo(ctx context.Context, streamName string, groupName string, options GetPersistentSubscriptionOptions) (*PersistentSubscriptionInfo, error)
func (*Client) GetPersistentSubscriptionInfoToAll ¶
func (client *Client) GetPersistentSubscriptionInfoToAll(ctx context.Context, groupName string, options GetPersistentSubscriptionOptions) (*PersistentSubscriptionInfo, error)
func (*Client) GetStreamMetadata ¶
func (client *Client) GetStreamMetadata( context context.Context, streamID string, opts ReadStreamOptions, ) (*StreamMetadata, error)
func (*Client) ListAllPersistentSubscriptions ¶
func (client *Client) ListAllPersistentSubscriptions(ctx context.Context, options ListPersistentSubscriptionsOptions) ([]PersistentSubscriptionInfo, error)
func (*Client) ListPersistentSubscriptionsForStream ¶
func (client *Client) ListPersistentSubscriptionsForStream(ctx context.Context, streamName string, options ListPersistentSubscriptionsOptions) ([]PersistentSubscriptionInfo, error)
func (*Client) ListPersistentSubscriptionsToAll ¶
func (client *Client) ListPersistentSubscriptionsToAll(ctx context.Context, options ListPersistentSubscriptionsOptions) ([]PersistentSubscriptionInfo, error)
func (*Client) ReadAll ¶
func (client *Client) ReadAll( context context.Context, opts ReadAllOptions, count uint64, ) (*ReadStream, error)
ReadAll ...
func (*Client) ReadStream ¶
func (client *Client) ReadStream( context context.Context, streamID string, opts ReadStreamOptions, count uint64, ) (*ReadStream, error)
ReadStream ...
func (*Client) ReplayParkedMessages ¶
func (*Client) ReplayParkedMessagesToAll ¶
func (*Client) RestartPersistentSubscriptionSubsystem ¶
func (client *Client) RestartPersistentSubscriptionSubsystem(ctx context.Context, options RestartPersistentSubscriptionSubsystemOptions) error
func (*Client) SetStreamMetadata ¶
func (client *Client) SetStreamMetadata( context context.Context, streamID string, opts AppendToStreamOptions, metadata StreamMetadata, ) (*WriteResult, error)
func (*Client) SubscribeToAll ¶
func (client *Client) SubscribeToAll( parent context.Context, opts SubscribeToAllOptions, ) (*Subscription, error)
SubscribeToAll ...
func (*Client) SubscribeToPersistentSubscription ¶
func (client *Client) SubscribeToPersistentSubscription( ctx context.Context, streamName string, groupName string, options SubscribeToPersistentSubscriptionOptions, ) (*PersistentSubscription, error)
SubscribeToPersistentSubscription ...
func (*Client) SubscribeToPersistentSubscriptionToAll ¶
func (client *Client) SubscribeToPersistentSubscriptionToAll( ctx context.Context, groupName string, options SubscribeToPersistentSubscriptionOptions, ) (*PersistentSubscription, error)
func (*Client) SubscribeToStream ¶
func (client *Client) SubscribeToStream( parent context.Context, streamID string, opts SubscribeToStreamOptions, ) (*Subscription, error)
SubscribeToStream ...
func (*Client) TombstoneStream ¶
func (client *Client) TombstoneStream( parent context.Context, streamID string, opts TombstoneStreamOptions, ) (*DeleteResult, error)
Tombstone ...
func (*Client) UpdatePersistentSubscription ¶
func (*Client) UpdatePersistentSubscriptionToAll ¶
type Configuration ¶
type Configuration struct { // The URI of the EventStoreDB. Use this when connecting to a single node. // Example: localhost:2113 Address string // An array of end points used to seed gossip. GossipSeeds []*EndPoint // Disable communicating over a secure channel. DisableTLS bool // Defaults to false. // The NodePreference to use when connecting. NodePreference NodePreference // The username to use for authenticating against the EventStoreDB instance. Username string // The password to use for authenticating against the EventStoreDB instance. Password string // RootCAs defines the set of root certificate authorities // that clients use when verifying server certificates. // If RootCAs is nil, TLS uses the host's root CA set. RootCAs *x509.CertPool // Defaults to nil. // Allows to skip certificate validation. SkipCertificateVerification bool // Defaults to false. // The maximum number of times to attempt end point discovery. MaxDiscoverAttempts int // Defaults to 10. // The polling interval (in milliseconds) used to discover the end point. DiscoveryInterval int // Defaults to 100 milliseconds. // The amount of time (in seconds) after which an attempt to discover gossip will fail. GossipTimeout int // Defaults to 5 seconds. // Specifies if DNS discovery should be used. DnsDiscover bool // Defaults to false. // The amount of time (in milliseconds) to wait after which a keepalive ping is sent on the transport. // If set below 10s, a minimum value of 10s will be used instead. Use -1 to disable. Use -1 to disable. KeepAliveInterval time.Duration // Defaults to 10 seconds. // The amount of time (in milliseconds) the sender of the keep alive ping waits for an acknowledgement. KeepAliveTimeout time.Duration // Defaults to 10 seconds. // The amount of time (in milliseconds) a non-streaming operation should take to complete before resulting in a // DeadlineExceeded. Defaults to 10 seconds. DefaultDeadline *time.Duration // Logging abstraction used by the client. Logger LoggingFunc }
Configuration describes how to connect to an instance of EventStoreDB.
func ParseConnectionString ¶
func ParseConnectionString(connectionString string) (*Configuration, error)
ParseConnectionString creates a Configuration based on an EventStoreDb connection string.
type ConsumerStrategy ¶
type ConsumerStrategy string
const ( ConsumerStrategy_RoundRobin ConsumerStrategy = "RoundRobin" ConsumerStrategy_DispatchToSingle ConsumerStrategy = "DispatchToSingle" ConsumerStrategy_Pinned ConsumerStrategy = "Pinned" ConsumerStrategy_PinnedByCorrelation ConsumerStrategy = "PinnedByCorrelation" )
type ContentType ¶
type ContentType int
const ( BinaryContentType ContentType = 0 JsonContentType ContentType = 1 )
type Credentials ¶
type DeletePersistentSubscriptionOptions ¶
type DeletePersistentSubscriptionOptions struct { Authenticated *Credentials Deadline *time.Duration }
type DeleteResult ¶
type DeleteResult struct {
Position Position
}
type DeleteStreamOptions ¶
type DeleteStreamOptions struct { ExpectedRevision ExpectedRevision Authenticated *Credentials Deadline *time.Duration }
type EndPoint ¶
func ParseEndPoint ¶
type ErrorCode ¶
type ErrorCode int
const ( ErrorUnknown ErrorCode = iota ErrorUnsupportedFeature ErrorDeadlineExceeded ErrorUnauthenticated ErrorResourceNotFound ErrorResourceAlreadyExists ErrorConnectionClosed ErrorWrongExpectedVersion ErrorAccessDenied ErrorStreamDeleted ErrorParsing ErrorInternalClient ErrorInternalServer ErrorNotLeader )
type EventAppeared ¶
type EventAppeared struct { Event *ResolvedEvent RetryCount int }
type EventData ¶
type EventData struct { EventID uuid.UUID EventType string ContentType ContentType Data []byte Metadata []byte }
EventData ...
type ExpectedRevision ¶
type ExpectedRevision interface {
// contains filtered or unexported methods
}
type FilterType ¶
type FilterType int
type GetPersistentSubscriptionOptions ¶
type GetPersistentSubscriptionOptions struct { Authenticated *Credentials Deadline *time.Duration }
type ListPersistentSubscriptionsOptions ¶
type ListPersistentSubscriptionsOptions struct { Authenticated *Credentials Deadline *time.Duration }
type LoggingFunc ¶ added in v2.1.0
func ConsoleLogging ¶ added in v2.1.0
func ConsoleLogging() LoggingFunc
func NoopLogging ¶ added in v2.1.0
func NoopLogging() LoggingFunc
type Nack_Action ¶
type Nack_Action int32
const ( Nack_Unknown Nack_Action = 0 Nack_Park Nack_Action = 1 Nack_Retry Nack_Action = 2 Nack_Skip Nack_Action = 3 Nack_Stop Nack_Action = 4 )
type NodePreference ¶
type NodePreference string
const ( NodePreference_Leader NodePreference = "Leader" NodePreference_Follower NodePreference = "Follower" NodePreference_ReadOnlyReplica NodePreference = "ReadOnlyReplica" NodePreference_Random NodePreference = "Random" )
func (NodePreference) String ¶
func (nodePreference NodePreference) String() string
type PersistentAllSubscriptionOptions ¶
type PersistentAllSubscriptionOptions struct { Settings *SubscriptionSettings StartFrom AllPosition MaxSearchWindow int Filter *SubscriptionFilter Authenticated *Credentials Deadline *time.Duration }
type PersistentStreamSubscriptionOptions ¶
type PersistentStreamSubscriptionOptions struct { Settings *SubscriptionSettings StartFrom StreamPosition Authenticated *Credentials Deadline *time.Duration }
type PersistentSubscription ¶
type PersistentSubscription struct {
// contains filtered or unexported fields
}
func NewPersistentSubscription ¶
func NewPersistentSubscription( client persistent.PersistentSubscriptions_ReadClient, subscriptionId string, cancel context.CancelFunc, logger *logger, ) *PersistentSubscription
func (*PersistentSubscription) Ack ¶
func (connection *PersistentSubscription) Ack(messages ...*ResolvedEvent) error
func (*PersistentSubscription) Close ¶
func (connection *PersistentSubscription) Close() error
func (*PersistentSubscription) Nack ¶
func (connection *PersistentSubscription) Nack(reason string, action Nack_Action, messages ...*ResolvedEvent) error
func (*PersistentSubscription) Recv ¶
func (connection *PersistentSubscription) Recv() *PersistentSubscriptionEvent
type PersistentSubscriptionConfig ¶
type PersistentSubscriptionConfig struct { ResolveLinkTos bool `json:"resolveLinktos"` StartFrom int64 `json:"startFrom"` StartPosition string `json:"startPosition,omitempty"` MessageTimeout int64 `json:"messageTimeoutMilliseconds"` ExtraStatistics bool `json:"extraStatistics"` MaxRetryCount int64 `json:"maxRetryCount"` LiveBufferSize int64 `json:"liveBufferSize"` BufferSize int64 `json:"bufferSize"` ReadBatchSize int64 `json:"readBatchSize"` PreferRoundRobin bool `json:"preferRoundRobin"` CheckpointAfter int64 `json:"checkPointAfterMilliseconds"` CheckpointLowerBound int64 `json:"minCheckPointCount"` CheckpointUpperBound int64 `json:"maxCheckPointCount"` MaxSubscriberCount int64 `json:"maxSubscriberCount"` ConsumerStrategyName string `json:"consumerStrategyName"` }
type PersistentSubscriptionConnectionInfo ¶
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"` }
type PersistentSubscriptionEvent ¶
type PersistentSubscriptionEvent struct { EventAppeared *EventAppeared SubscriptionDropped *SubscriptionDropped CheckPointReached *Position }
type PersistentSubscriptionInfo ¶
type PersistentSubscriptionInfo struct { EventSource string GroupName string Status string Connections []PersistentSubscriptionConnectionInfo Settings *SubscriptionSettings Stats *PersistentSubscriptionStats }
type PersistentSubscriptionInfoHttpJson ¶
type PersistentSubscriptionInfoHttpJson struct { EventStreamId string `json:"eventStreamId"` GroupName string `json:"groupName"` Status string `json:"status"` AverageItemsPerSecond float64 `json:"averageItemsPerSecond"` TotalItemsProcessed int64 `json:"totalItemsProcessed"` LastProcessedEventNumber int64 `json:"lastProcessedEventNumber"` LastKnownEventNumber int64 `json:"lastKnownEventNumber"` LastCheckpointedEventPosition string `json:"lastCheckpointedEventPosition,omitempty"` LastKnownEventPosition string `json:"lastKnownEventPosition,omitempty"` ConnectionCount int64 `json:"connectionCount,omitempty"` TotalInFlightMessages int64 `json:"totalInFlightMessages"` Config *PersistentSubscriptionConfig `json:"config,omitempty"` Connections []PersistentSubscriptionConnectionInfo `json:"connections,omitempty"` ReadBufferCount int64 `json:"readBufferCount"` RetryBufferCount int64 `json:"retryBufferCount"` LiveBufferCount int64 `json:"liveBufferCount"` OutstandingMessagesCount int64 `json:"OutstandingMessagesCount"` ParkedMessageCount int64 `json:"parkedMessageCount"` CountSinceLastMeasurement int64 `json:"countSinceLastMeasurement"` }
type PersistentSubscriptionStats ¶
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 }
type PersistentSubscriptionStatus ¶
type PersistentSubscriptionStatus string
type ReadAllOptions ¶
type ReadAllOptions struct { Direction Direction From AllPosition ResolveLinkTos bool Authenticated *Credentials Deadline *time.Duration }
type ReadStream ¶
type ReadStream struct {
// contains filtered or unexported fields
}
func (*ReadStream) Close ¶
func (stream *ReadStream) Close()
func (*ReadStream) Recv ¶
func (stream *ReadStream) Recv() (*ResolvedEvent, error)
type ReadStreamOptions ¶
type ReadStreamOptions struct { Direction Direction From StreamPosition ResolveLinkTos bool Authenticated *Credentials Deadline *time.Duration }
type RecordedEvent ¶
type RecordedEvent struct { EventID uuid.UUID EventType string ContentType string StreamID string EventNumber uint64 Position Position CreatedDate time.Time Data []byte SystemMetadata map[string]string UserMetadata []byte }
RecordedEvent ...
type ReplayParkedMessagesOptions ¶
type ReplayParkedMessagesOptions struct { Authenticated *Credentials StopAt int Deadline *time.Duration }
type ResolvedEvent ¶
type ResolvedEvent struct { Link *RecordedEvent Event *RecordedEvent Commit *uint64 }
func (ResolvedEvent) OriginalEvent ¶
func (resolved ResolvedEvent) OriginalEvent() *RecordedEvent
type RestartPersistentSubscriptionSubsystemOptions ¶
type RestartPersistentSubscriptionSubsystemOptions struct { Authenticated *Credentials Deadline *time.Duration }
type ServerInfo ¶
type ServerInfo struct { Version ServerVersion FeatureFlags int }
type ServerVersion ¶
type StreamExists ¶
type StreamExists struct{}
type StreamMetadata ¶
type StreamMetadata struct {
// contains filtered or unexported fields
}
func StreamMetadataFromMap ¶
func StreamMetadataFromMap(props map[string]interface{}) (StreamMetadata, error)
func (*StreamMetadata) Acl ¶
func (m *StreamMetadata) Acl() interface{}
func (*StreamMetadata) AddCustomProperty ¶
func (m *StreamMetadata) AddCustomProperty(name string, value interface{})
func (*StreamMetadata) CacheControl ¶
func (m *StreamMetadata) CacheControl() *time.Duration
func (*StreamMetadata) IsSystemStreamAcl ¶
func (m *StreamMetadata) IsSystemStreamAcl() bool
func (*StreamMetadata) IsUserStreamAcl ¶
func (m *StreamMetadata) IsUserStreamAcl() bool
func (*StreamMetadata) MaxAge ¶
func (m *StreamMetadata) MaxAge() *time.Duration
func (*StreamMetadata) MaxCount ¶
func (m *StreamMetadata) MaxCount() *uint64
func (*StreamMetadata) SetAcl ¶
func (m *StreamMetadata) SetAcl(value interface{})
func (*StreamMetadata) SetCacheControl ¶
func (m *StreamMetadata) SetCacheControl(value time.Duration)
func (*StreamMetadata) SetMaxAge ¶
func (m *StreamMetadata) SetMaxAge(value time.Duration)
func (*StreamMetadata) SetMaxCount ¶
func (m *StreamMetadata) SetMaxCount(value uint64)
func (*StreamMetadata) SetTruncateBefore ¶
func (m *StreamMetadata) SetTruncateBefore(value uint64)
func (*StreamMetadata) StreamAcl ¶
func (m *StreamMetadata) StreamAcl() *Acl
func (StreamMetadata) ToMap ¶
func (m StreamMetadata) ToMap() (map[string]interface{}, error)
func (*StreamMetadata) TruncateBefore ¶
func (m *StreamMetadata) TruncateBefore() *uint64
type StreamPosition ¶
type StreamPosition interface {
// contains filtered or unexported methods
}
type StreamRevision ¶
type StreamRevision struct {
Value uint64
}
func Revision ¶
func Revision(value uint64) StreamRevision
type SubscribeToAllOptions ¶
type SubscribeToAllOptions struct { From AllPosition ResolveLinkTos bool MaxSearchWindow int CheckpointInterval int Filter *SubscriptionFilter Authenticated *Credentials Deadline *time.Duration }
type SubscribeToPersistentSubscriptionOptions ¶
type SubscribeToPersistentSubscriptionOptions struct { BufferSize uint32 Authenticated *Credentials Deadline *time.Duration }
type SubscribeToStreamOptions ¶
type SubscribeToStreamOptions struct { From StreamPosition ResolveLinkTos bool Authenticated *Credentials Deadline *time.Duration }
type Subscription ¶
type Subscription struct {
// contains filtered or unexported fields
}
func NewSubscription ¶
func NewSubscription(client *Client, cancel context.CancelFunc, inner api.Streams_ReadClient, id string) *Subscription
func (*Subscription) Close ¶
func (sub *Subscription) Close() error
func (*Subscription) Id ¶
func (sub *Subscription) Id() string
func (*Subscription) Recv ¶
func (sub *Subscription) Recv() *SubscriptionEvent
type SubscriptionDropped ¶
type SubscriptionDropped struct {
Error error
}
type SubscriptionEvent ¶
type SubscriptionEvent struct { EventAppeared *ResolvedEvent SubscriptionDropped *SubscriptionDropped CheckPointReached *Position }
type SubscriptionFilter ¶
type SubscriptionFilter struct { Type FilterType Prefixes []string Regex string }
func ExcludeSystemEventsFilter ¶
func ExcludeSystemEventsFilter() *SubscriptionFilter
type SubscriptionFilterOptions ¶
type SubscriptionFilterOptions struct { MaxSearchWindow int CheckpointInterval int SubscriptionFilter *SubscriptionFilter }
type SubscriptionSettings ¶
type SubscriptionSettings 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 }
func SubscriptionSettingsDefault ¶
func SubscriptionSettingsDefault() SubscriptionSettings
type TombstoneStreamOptions ¶
type TombstoneStreamOptions struct { ExpectedRevision ExpectedRevision Authenticated *Credentials Deadline *time.Duration }
type WriteResult ¶
WriteResult ...
Source Files ¶
- append_options.go
- client.go
- configuration.go
- credentials.go
- delete_options.go
- delete_result.go
- endpoint.go
- errors.go
- event_data.go
- impl.go
- logging.go
- options.go
- persistent_options.go
- persistent_subscription.go
- persistent_subscription_client.go
- persistent_subscription_http_client.go
- position.go
- protobuf_utils.go
- read_options.go
- reads.go
- recorded_event.go
- resolved_event.go
- revision.go
- subscribe_options.go
- subscription_event.go
- subscriptions.go
- tombstone_options.go
- types.go
- write_result.go
Click to show internal directories.
Click to hide internal directories.