Skip to content

paysuper/go-micro-plugins-protocol-one

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-micro-plugins-protocol-one

Build Status codecov

A repository for go-micro protocol one plugins.

Overview

Micro tooling is built on a powerful pluggable architecture. Plugins can be swapped out with zero code changes. This repository contains plugins for all micro related tools. Read on for further info.

Contents

Contents of this repository:

Directory Description
Wrappers Prometheus

Usage

Plugins can be added to go-micro in the following ways. By doing so they'll be available to set via command line args or environment variables.

Import the plugins in a Go program then call service.Init to parse the command line and environment variables.

import (
	"github.com/micro/go-micro"
	prometheus_plugin "github.com/paysuper/go-micro-plugins-protocol-one/wrapper/monitoring/prometheus"
)

func main() {
	service := micro.NewService(
		// Set service name
		micro.Name("my.service"),
		
		// Register wrapper
		micro.WrapHandler(prometheus_plugin.NewHandlerWrapper((*proto.MyServiceInterface)(nil))),		
	)

	// Parse CLI flags
	service.Init()
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%