rpc

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: MulanPSL-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetGlobal

func SetGlobal(cli *ClientSet)

Types

type Authentication

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

Authentication todo

func (*Authentication) GetRequestMetadata

func (a *Authentication) GetRequestMetadata(context.Context, ...string) (
	map[string]string, error,
)

GetRequestMetadata todo

func (*Authentication) RequireTransportSecurity

func (a *Authentication) RequireTransportSecurity() bool

RequireTransportSecurity todo

func (*Authentication) SetClientCredentials

func (a *Authentication) SetClientCredentials(clientID, clientSecret string)

SetClientCredentials todo

type ClientSet

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

ClientSet 客户端

func C

func C() *ClientSet

C Global

func NewClient

func NewClient(conf *rpc.Config) (*ClientSet, error)

NewClient todo 传递注册中心地址

func (*ClientSet) Endpoint added in v0.0.3

func (c *ClientSet) Endpoint() endpoint.RPCClient

Endpoint 服务的SDK

func (*ClientSet) Policy added in v0.0.3

func (c *ClientSet) Policy() policy.RPCClient

Policy 服务的SDK

func (*ClientSet) Role added in v0.0.3

func (c *ClientSet) Role() role.RPCClient

Role 服务的SDK

func (*ClientSet) Token

func (c *ClientSet) Token() token.ServiceClient

Token 服务的SDK

type Config

type Config struct {
	*Authentication
	// contains filtered or unexported fields
}

Config 客户端配置

func NewDefaultConfig

func NewDefaultConfig() *Config

NewDefaultConfig todo

func (*Config) Address

func (c *Config) Address() string

Address 地址

func (*Config) SetAddress

func (c *Config) SetAddress(addr string)

SetAddress todo

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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