Skip to content

core-go/client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 

Repository files navigation

client

  • This library is used to communicate with other services by http

Installation

Please make sure to initialize a Go module before installing core-go/client:

go get -u github.com/core-go/client

Import:

import "github.com/core-go/client"

Features

Initialize http client from config

  • Initialize client for http
  • Initialize client for https

Log request, response at client

Support to turn on, turn off

  • request
  • response
  • duration
  • http response status code
  • response content length

Benefits

  • Do not need to re-compile the service, user can switch client from http to https
  • Do not need to re-compile the service, user can turn on, turn off the log (request, response, duration, response content length...)

Microservice Architect

Microservice Architect

A typical micro service

When you zoom one micro service, the flow is as below A typical micro service