kratos: github.com/go-kratos/kratos/pkg/net/rpc/warden/resolver/direct Index | Files

package direct

import "github.com/go-kratos/kratos/pkg/net/rpc/warden/resolver/direct"

Index

Package Files

direct.go

Constants

const (
    // Name is the name of direct resolver
    Name = "direct"
)

type Direct Uses

type Direct struct {
    // contains filtered or unexported fields
}

Direct is a resolver for conneting endpoints directly. example format: direct://default/192.168.1.1:8080,192.168.1.2:8081

func Build Uses

func Build(id string) *Direct

Build build direct.

func New Uses

func New() *Direct

New return Direct

func (*Direct) Build Uses

func (d *Direct) Build(id string, opt ...naming.BuildOpt) naming.Resolver

Build direct build.

func (*Direct) Close Uses

func (d *Direct) Close() error

Close close Direct

func (*Direct) Fetch Uses

func (d *Direct) Fetch(ctx context.Context) (res *naming.InstancesInfo, found bool)

Fetch fetch isntances.

func (*Direct) Scheme Uses

func (d *Direct) Scheme() string

Scheme return the Scheme of Direct

func (*Direct) Unwatch Uses

func (d *Direct) Unwatch(id string)

Unwatch a tree.

func (*Direct) Watch Uses

func (d *Direct) Watch() <-chan struct{}

Watch a tree.

Package direct imports 6 packages (graph) and is imported by 2 packages. Updated 2020-06-01. Refresh now. Tools for package owners.