v3 refactor (#1868)

* Move to v3

Co-authored-by: Ben Toogood <bentoogood@gmail.com>
This commit is contained in:
Asim Aslam
2020-07-27 13:22:00 +01:00
committed by GitHub
parent 9dfeb98111
commit 563768b58a
424 changed files with 6383 additions and 22490 deletions

View File

@@ -4,8 +4,7 @@ import (
"context"
"time"
"github.com/micro/go-micro/v2/client"
"github.com/micro/go-micro/v2/store"
"github.com/micro/go-micro/v3/store"
)
func NewOptions(opts ...Option) Options {
@@ -13,10 +12,6 @@ func NewOptions(opts ...Option) Options {
for _, o := range opts {
o(&options)
}
if options.Client == nil {
options.Client = client.DefaultClient
}
return options
}
@@ -37,10 +32,10 @@ type Options struct {
LoginURL string
// Store to back auth
Store store.Store
// Client to use for RPC
Client client.Client
// Addrs sets the addresses of auth
Addrs []string
// Context to store other options
Context context.Context
}
type Option func(o *Options)
@@ -102,13 +97,6 @@ func LoginURL(url string) Option {
}
}
// WithClient sets the client to use when making requests
func WithClient(c client.Client) Option {
return func(o *Options) {
o.Client = c
}
}
type GenerateOptions struct {
// Metadata associated with the account
Metadata map[string]string