service-go

module
v0.0.0-...-8a048ba Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: MIT

README

Introduction

This is a template for doing go-micro development using GitLab. It's based on the helloworld Go Micro template.

GitLab CI Documentation Go Micro Overview Go Micro Toolkit

Getting started

First thing to do is update main.go with your new project path:

  •   proto "gitlab.com/gitlab-org/project-templates/go-micro/proto"
    
  •   proto "gitlab.com/$YOUR_NAMESPACE/$PROJECT_NAME/proto"
    

Note that these are not actual environment variables, but values you should replace.

What's contained in this project

main.go - is the main definition of the service, handler and client proto - contains the protobuf definition of the API

Dependencies

Install the following

micro protoc-gen-micro

Run Service

go run main.go

Query Service

micro call greeter Greeter.Hello '{"name": "John"}'

Directories

Path Synopsis
cmd
internal
pkg

Jump to

Keyboard shortcuts

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