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

github.com/micro/examples/blog/posts

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/micro/examples/blog/posts

  • v0.0.0-20200720141632-3eb06fb1774d
  • Source
  • Go
  • Socket score

Version published
Created
Source

Post Service

Create a post

micro call go.micro.service.posts Posts.Post '{"post":{"id":"1","title":"How to Micro","content":"Simply put, Micro is awesome."}}'
micro call go.micro.service.posts Posts.Post '{"post":{"id":"2","title":"Fresh posts are fresh","content":"This post is fresher than the How to Micro one"}}'

Query posts

micro call go.micro.service.posts Posts.Query '{}'
micro call go.micro.service.posts Posts.Query '{"slug":"how-to-micro"}'
micro call go.micro.service.posts Posts.Query '{"offset": 10, "limit": 10}'

Delete posts

micro call go.micro.service.posts Posts.Delete '{"offset": 10, "limit": 10}'

Generated with

micro new --namespace=go.micro --type=service posts

Getting Started

  • Configuration
  • Dependencies
  • Usage

Configuration

  • FQDN: go.micro.service.posts
  • Type: service
  • Alias: posts

Dependencies

Micro services depend on service discovery. The default is multicast DNS, a zeroconf system.

In the event you need a resilient multi-host setup we recommend etcd.

# install etcd
brew install etcd

# run etcd
etcd

Usage

A Makefile is included for convenience

Build the binary

make build

Run the service

./posts-service

Build a docker image

make docker

FAQs

Package last updated on 20 Jul 2020

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