service

package
v0.4.0-alpha3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2022 License: Apache-2.0 Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrActionSourceIDNotFound = errors.New("event source id not found")
	ErrActionNameNotFound     = errors.New("event name not found")
)
View Source
var (
	ErrEventSourceIDNotFound = errors.New("event source id not found")
	ErrEventNameNotFound     = errors.New("event name not found")
)
View Source
var (
	ErrInboundChannelNotFound     = errors.New("inbound channel not found")
	ErrSubscriberChannelsNotFound = errors.New("subscriber channels not found")
	ErrAlreadySubscribed          = errors.New("already subscribed")
)

Functions

This section is empty.

Types

type ActionService

type ActionService struct {
	// contains filtered or unexported fields
}

func NewActionService

func NewActionService(repository *repository.Repository) *ActionService

func (*ActionService) GetActionType

func (s *ActionService) GetActionType(sourceID string, name string) (*model.ActionType, error)

func (*ActionService) GetActionTypes

func (s *ActionService) GetActionTypes() ([]model.ActionType, error)

func (*ActionService) GetActionTypesBySourceID

func (s *ActionService) GetActionTypesBySourceID(sourceID string) ([]model.ActionType, error)

func (*ActionService) RegisterActionType

func (s *ActionService) RegisterActionType(actionType model.ActionType) (*model.ActionType, error)

func (*ActionService) Start

func (s *ActionService) Start(ctx *context.Context)

func (*ActionService) Subscribe

func (s *ActionService) Subscribe(sourceID string, names []string) (chan model.Action, error)

func (*ActionService) Trigger

func (s *ActionService) Trigger(action model.Action) (*model.Action, error)

func (*ActionService) Unsubscribe

func (s *ActionService) Unsubscribe(sourceID string, name string, c chan model.Action) error

type EventService

type EventService struct {
	// contains filtered or unexported fields
}

func NewEventService

func NewEventService(repository *repository.Repository) *EventService

func (*EventService) GetEventType

func (s *EventService) GetEventType(sourceID string, name string) (*model.EventType, error)

func (*EventService) GetEventTypes

func (s *EventService) GetEventTypes() ([]model.EventType, error)

func (*EventService) GetEventTypesBySourceID

func (s *EventService) GetEventTypesBySourceID(sourceID string) ([]model.EventType, error)

func (*EventService) Publish

func (s *EventService) Publish(event model.Event) (*model.Event, error)

func (*EventService) RegisterEventType

func (s *EventService) RegisterEventType(eventType model.EventType) (*model.EventType, error)

func (*EventService) Start

func (s *EventService) Start(ctx *context.Context)

func (*EventService) Subscribe

func (s *EventService) Subscribe(sourceID string, names []string) (chan model.Event, error)

func (*EventService) Unsubscribe

func (s *EventService) Unsubscribe(sourceID string, name string, c chan model.Event) error

type MessageBus

type MessageBus struct{}

func NewMessageBus

func NewMessageBus() *MessageBus

type Services

type Services struct {
	EventService  *EventService
	ActionService *ActionService
}

func NewServices

func NewServices(repository *repository.Repository) Services

func (*Services) Start

func (s *Services) Start(ctx *context.Context)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL