Documentation ¶
Index ¶
- func AppendToFile(fileName string, newText string) error
- func ReadFromFile(fileName string) ([]string, error)
- func WriteToFile(fileName string, text string) error
- type EventMirroringToFileService
- func (s *EventMirroringToFileService) Acknowledge(ctx *context.Context, event *event.Event) *types.Error
- func (s *EventMirroringToFileService) Consume(ctx *context.Context, topicName string) (*event.Event, *types.Error)
- func (s *EventMirroringToFileService) IsExist(ctx *context.Context, event *event.Event) bool
- func (s *EventMirroringToFileService) Publish(ctx *context.Context, params *event.PublishEventParams) *types.Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendToFile ¶
AppendToFile append text to file after new line
func ReadFromFile ¶
ReadFromFile read text to file return array of string (array represent the line number in file)
func WriteToFile ¶
WriteToFile write text to file
Types ¶
type EventMirroringToFileService ¶
type EventMirroringToFileService struct {
// contains filtered or unexported fields
}
EventMirroringToFileService implementor of event mirroring service which stores to file
func NewEventMirroringToFileService ¶
func NewEventMirroringToFileService( fileName string, serviceName string, pubsubTopics map[string]*pubsub.Topic, notifier notifier.Notifier, ) *EventMirroringToFileService
NewEventMirroringToFileService build new event mirroring to file services object
func (*EventMirroringToFileService) Acknowledge ¶
func (s *EventMirroringToFileService) Acknowledge(ctx *context.Context, event *event.Event) *types.Error
Acknowledge acknowledge / remove event from file by idempotentId
func (*EventMirroringToFileService) Consume ¶
func (s *EventMirroringToFileService) Consume(ctx *context.Context, topicName string) (*event.Event, *types.Error)
Consume consume event from file with return the first event from file
func (*EventMirroringToFileService) Publish ¶
func (s *EventMirroringToFileService) Publish(ctx *context.Context, params *event.PublishEventParams) *types.Error
Publish publish event with mirroring in file
Click to show internal directories.
Click to hide internal directories.