Skip to content

Releases: micro/go-micro

0.22.0 - Evolutionary changes

18 Jan 12:46
943219f
Compare
Choose a tag to compare

Address backwards compatibility

Due to breaking changes in the past 3 weeks, I've had to address how this should be tackled in the long term. I've made the effort to make codec transition evolutionary as well as the api changes for Method() move to Endpoint(). In the process I've had to break the CallFunc signature but few likely use this. One thing which has not changed though is the registry. We are still making use of MDNS as the default.

  • Codecs are now evolutionary and backwards compatible
  • Service Method() is now back in the interface

0.21.0 - MDNS becomes the default registry

17 Jan 10:33
Compare
Choose a tag to compare

Changes:

  • Make MDNS the default registry
  • Move mocks to be memory implementations
  • Add metadata.Copy function

MDNS becomes the default registry. If you're using consul specify --registry=consul or MICRO_REGISTRY=consul

0.20.0 - Breaking Changes

14 Jan 09:05
Compare
Choose a tag to compare

BREAKING CHANGES

Codec

Do not move to this tag unless you're willing to incur the breaking changes.
This changes the default codec to raw protobuf and switches the content-type
application/octet-stream to use the bytes codec also. This breaking change
affects any previous use.

To explicitly be backwards compatible do the following.

In the server

// Process octet-stream as proto-rpc in the old ways
server.DefaultCodecs["application/octet-stream"] = protorpc.NewCodec
// Process json in the old way
server.DefaultCodecs["application/json"] = jsonrpc.NewCodec
// Process protobuf in the old way
server.DefaultCodecs["application/protobuf"] = protorpc.NewCodec

In the client

// In the client send proto-rpc to be forwards compatible
client.DefaultContentType = "application/proto-rpc"

There are changes to application/json and application/protobuf to use raw formats
rather than json-rpc or proto-rpc. This will likely break behaviour via the api.
The easiest way to resolve this is to reset these as well but it causes further issue.

I would advise finding a common rolling path forward e.g a common compatible content-type/codec.

This is an unfortunate change that has to be made so we can process raw formats.

The old list of codecs and can be set as follows

import (
        "github.com/micro/go-micro/server"
        "github.com/micro/go-micro/client"
)

func init() {
	codecs = map[string]codec.NewCodec{
		"application/json":         jsonrpc.NewCodec,
		"application/json-rpc":     jsonrpc.NewCodec,
		"application/protobuf":     protorpc.NewCodec,
		"application/proto-rpc":    protorpc.NewCodec,
		"application/octet-stream": protorpc.NewCodec,
	}
        server.DefaultCodecs = codecs
        client.DefaultCodecs = codecs
)

Endpoint

Method now moves to endpoint. In most places we have Endpoint specified except in the client/server abstractions.
This has now moved. Most should be unaffected. But be aware of the change. Any wrappers may break.

0.17.0

03 Jan 11:32
461df8d
Compare
Choose a tag to compare
  • Offline inbox for http broker
  • JSON/Proto/GRPC codec
  • HTTP proxy from environment

0.16.0

29 Dec 15:46
Compare
Choose a tag to compare
  • Fix cache/gossip data race
  • Rename cache selector to registry

0.15.1

18 Dec 18:18
f2efc68
Compare
Choose a tag to compare
  • Selector cache lookup optimization

0.15.0

13 Dec 18:37
Compare
Choose a tag to compare
  • Public NewSubscribeOptions
  • http2 broker support
  • Timeout error function
  • Consul Query Options
  • Gossip registry
  • RPC Codec renaming

0.14.1

22 Nov 10:42
Compare
Choose a tag to compare
  • bug fix for socket headers

0.14.0

21 Nov 10:53
1ce0df4
Compare
Choose a tag to compare
  • use google uuid
  • add http handler option

0.13.0

15 Nov 21:31
98bb4a6
Compare
Choose a tag to compare
  • add local/remote ip methods
  • various linting things
  • get checks on 0 ttl
  • accept loop