in

Implement a file processor solution in concurrency pattern using Golang goroutine


Implement a file processor solution in concurrency pattern using Golang goroutine.

Get Started

  1. Run docker-compose up to start the localstack and redis services.
  2. Create a Dynamodb table if the storage is Dynamodb.
    aws dynamodb create-table --table-name Users --attribute-definitions AttributeName=UUID,AttributeType=S --key-schema AttributeName=UUID,KeyType=HASH --billing-mode PAY_PER_REQUEST --endpoint-url=http://localhost:4566 --profile localstack
    
  3. There are 3 types of storage services defined, Dynamodb, Redis, and Fake storages. The storage service is injected via this code.
    writer := &fileprocessor.StorageWriter{
    	// Storage: storage.NewDynamodbService(),
    	// Storage: storage.NewFakeStorage(),
    	Storage: storage.NewRedisService(),
    }
    
  4. Run go run main.go --path /path/to/file

View Github




Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

GIPHY App Key not set. Please check settings

10 Best Software to Create Beautiful Gantt Charts for Your Projects

Truffle — Uses past Slack threads to help answer repeated questions