Documentation ¶
Index ¶
- Variables
- func GetEventBus() *eventBus
- func GetMediator() *mediator
- func GetRepositoryService(model Entitier) *repositoryService
- func GetStateService() *stateService
- func NewEventBusBuilder() *eventBusBuilder
- func NewMediatorBuilder() *mediatorBuilder
- func NewRepositoryServiceBuilder(model Entitier, tableName string) *repositoryServiceBuilder
- func NewStateServiceBuilder() *stateServiceBuilder
- func UseTracing(settings TracingSettings)
- type CacheSettings
- type CircuitBreakerSettings
- type DomainEvent
- func (e *DomainEvent) GetCanBuffered() bool
- func (e *DomainEvent) GetCanNotPublishToEventsource() bool
- func (e *DomainEvent) GetEventID() uuid.UUID
- func (e *DomainEvent) GetID() uuid.UUID
- func (e *DomainEvent) GetTopic() string
- func (e *DomainEvent) SetAddingEvent()
- func (e *DomainEvent) SetPublishingEvent(ctx context.Context, publishedAt time.Time)
- type DomainEventer
- type Entitier
- type Entity
- type EventBusSettings
- type KV
- type Middleware
- type Notification
- type NotificationHandler
- type ReplyHandler
- type RepositoryServiceSettings
- type Request
- type RequestHandler
- type Result
- type StateServiceSettings
- type TracingSettings
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInternalServerError = errors.New("internal Server Error") ErrNotFound = errors.New("your requested Item is not found") ErrConflict = errors.New("your Item already exist") ErrBadRequest = errors.New("given Param is not valid") ErrForbiddenAcccess = errors.New("your access is forbidden") )
Functions ¶
func GetEventBus ¶
func GetEventBus() *eventBus
func GetMediator ¶
func GetMediator() *mediator
func GetRepositoryService ¶
func GetRepositoryService(model Entitier) *repositoryService
func GetStateService ¶
func GetStateService() *stateService
func NewEventBusBuilder ¶
func NewEventBusBuilder() *eventBusBuilder
Constructor for EventBusBuilder
func NewMediatorBuilder ¶
func NewMediatorBuilder() *mediatorBuilder
Constructor for MediatorBuilder
func NewRepositoryServiceBuilder ¶
Constructor for RepositoryServiceBuilder
func NewStateServiceBuilder ¶
func NewStateServiceBuilder() *stateServiceBuilder
Constructor for StateServiceBuilder
func UseTracing ¶
func UseTracing(settings TracingSettings)
reference: https://github.com/openzipkin/zipkin-go/blob/master/examples/httpserver_test.go
Types ¶
type CacheSettings ¶ added in v0.9.0
type CircuitBreakerSettings ¶
type CircuitBreakerSettings struct { Name string AllowedRequestInHalfOpen int `model:",omitempty"` DurationOfBreak time.Duration `model:",omitempty"` SamplingDuration time.Duration `model:",omitempty"` SamplingFailureCount int `model:",omitempty"` SamplingFailureRatio float64 OnStateChange func(name string, from string, to string) }
func (*CircuitBreakerSettings) ToCircuitBreaker ¶ added in v0.9.3
func (s *CircuitBreakerSettings) ToCircuitBreaker(defaultName string, onCircuitOpen func()) *gobreaker.CircuitBreaker
type DomainEvent ¶
type DomainEvent struct { ID uuid.UUID EventID uuid.UUID Topic string CanNotPublishToEventsource bool IsPublished bool CanBuffered bool CreatedAt time.Time PublishedAt time.Time }
func (*DomainEvent) GetCanBuffered ¶
func (e *DomainEvent) GetCanBuffered() bool
func (*DomainEvent) GetCanNotPublishToEventsource ¶
func (e *DomainEvent) GetCanNotPublishToEventsource() bool
func (*DomainEvent) GetEventID ¶
func (e *DomainEvent) GetEventID() uuid.UUID
func (*DomainEvent) GetID ¶
func (e *DomainEvent) GetID() uuid.UUID
func (*DomainEvent) GetTopic ¶
func (e *DomainEvent) GetTopic() string
func (*DomainEvent) SetAddingEvent ¶
func (e *DomainEvent) SetAddingEvent()
func (*DomainEvent) SetPublishingEvent ¶
func (e *DomainEvent) SetPublishingEvent(ctx context.Context, publishedAt time.Time)
type DomainEventer ¶
type Entity ¶
type EventBusSettings ¶
type Middleware ¶
type Middleware struct {
// contains filtered or unexported fields
}
func (*Middleware) AddNext ¶
func (m *Middleware) AddNext(next behavior) behavior
func (*Middleware) Next ¶
func (m *Middleware) Next() Result
type Notification ¶
type Notification interface{}
type NotificationHandler ¶
type ReplyHandler ¶
type ReplyHandler func(receivedData interface{})
type RepositoryServiceSettings ¶ added in v0.11.0
type RequestHandler ¶
type StateServiceSettings ¶ added in v0.11.0
type TracingSettings ¶
Source Files ¶
- cache.go
- commandRepositoryAdapter.go
- core.go
- domainEvent.go
- entity.go
- errors.go
- eventBus.go
- eventBusBuilder.go
- mediator.go
- mediatorBuilder.go
- messagingAdapter.go
- middleware.go
- queryRepositoryAdapter.go
- repositoryService.go
- repositoryServiceBuilder.go
- result.go
- settings.go
- stateAdapter.go
- stateService.go
- stateServiceBuilder.go
- types.go
Click to show internal directories.
Click to hide internal directories.