Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/nestoroprysk/repl-log

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/nestoroprysk/repl-log

  • v0.0.0-20211013233103-21e3219d01fa
  • Source
  • Go
  • Socket score

Version published
Created
Source

Overview

Replication log is a distributed systems course homework assignment.

Running the App

    # tilt (for UI and live updates)
    tilt up

    # or build images
    docker build -f Dockerfile -t node .
    docker build -f Dockerfile.test -t test .

    # and use docker-compose
    docker-compose up

Using the App

    # ping master
    curl localhost:8080/ping
    # ping secondary-1
    curl localhost:8081/ping
    # ping secondary-2
    curl localhost:8082/ping

    # post a message (master only)
    curl -X POST -d '{"message":"abc"}' localhost:8080/messages

    # list messages of master
    curl localhost:8080/messages
    # list messages of secondary-1
    curl localhost:8081/messages
    # list messages of secondary-2
    curl localhost:8082/messages

    # namespaces
    curl localhost:8080/namespaces
    curl -X POST -d '{"message":"local","namespace":"ns"}' localhost:8080/messages
    curl 'localhost:8080/messages?namespace=ns'
    curl 'localhost:8080/messages?namespace=ns&namespace=default'
    # flush all the messages inside the namespace
    curl -X DELETE localhost:8080/namespaces/ns

    # post a message with a 5 second delay (secondaries reply with the delay)
    curl -X POST -d '{"message":"abc","delay":1000}' localhost:8080/messages

Running Tests

    # using the docker-compose (make sure that the service is up)
    docker-compose run test

    # or locally
    CONFIG_PATH=$(pwd)/test-local.json go test ./integration

Sources

FAQs

Package last updated on 13 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc