examples

module
v3.0.0-...-7136c61 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2021 License: Apache-2.0

README

Examples

This is a repository for go-micro examples. Feel free to contribute.

Contents

  • broker - A example of using Broker for Publish and Subscribing.
  • cache - Usage of the Cache package to create a cache service.
  • client - Usage of the Client package to call a service.
  • config - Using Go Config for dynamic config
  • event - Using the API Gateway event handler
  • filter - Filter nodes of a service when requesting
  • flags - Using command line flags with a service
  • function - Example of using Function programming model
  • getip - Get the local and remote ip from metadata
  • graceful - Demonstrates graceful shutdown of a service
  • greeter - A complete greeter example (includes python, ruby examples)
  • heartbeat - Make services heartbeat with discovery for high availability
  • helloworld - Hello world using micro
  • metadata - Extracting metadata from context of a request
  • mocking - Demonstrate mocking helloworld service
  • noproto - Use micro without protobuf or code generation, only go types
  • options - Setting options in the go-micro framework
  • plugins - How to use plugins
  • pubsub - Example of using pubsub at the client/server level
  • redirect - An example of how to http redirect using an API service
  • roundrobin - A stateful client wrapper for true round robin of requests
  • secure - Demonstrates use of transport secure option for self signed certs
  • server - Use of the Server package directly to server requests.
  • service - Example of the top level Service in go-micro.
  • sharding - An example of how to shard requests or use session affinity
  • shutdown - Demonstrates graceful shutdown via context cancellation
  • stream - An example of a streaming service and client
  • waitgroup - Demonstrates how to use a waitgroup with a service
  • wrapper - A simple example of using a log wrapper

Directories

Path Synopsis
pub
config
event
srv
srv/proto
Package pubsub is a generated protocol buffer package.
Package pubsub is a generated protocol buffer package.
version
Package version provides a way of calling a version of a service
Package version provides a way of calling a version of a service
proto
Package greeter is a generated protocol buffer package.
Package greeter is a generated protocol buffer package.
proto/hello
Package greeter is a generated protocol buffer package.
Package greeter is a generated protocol buffer package.
proto
Package greeter is a generated protocol buffer package.
Package greeter is a generated protocol buffer package.
greeter
cli
srv
Package main
Package main
http
cli
srv
metadata
cli
srv
pubsub
cli
srv
srv/proto
Package pubsub is a generated protocol buffer package.
Package pubsub is a generated protocol buffer package.
secure
cli
srv
srv/proto/hello
Package go_micro_srv_greeter is a generated protocol buffer package.
Package go_micro_srv_greeter is a generated protocol buffer package.
proto/example
Package go_micro_srv_example is a generated protocol buffer package.
Package go_micro_srv_example is a generated protocol buffer package.
stream
server/proto
Package stream is a generated protocol buffer package.
Package stream is a generated protocol buffer package.
cli

Jump to

Keyboard shortcuts

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