client

package
v0.0.0-...-10437d4 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClientHeaderKey = "client-id"
	ClientSecretKey = "client-secret"
)

Variables

This section is empty.

Functions

This section is empty.

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 Client

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

func NewClient

func NewClient(conf *Config) (*Client, error)

func (*Client) Host

func (c *Client) Host() host.ServiceClient

Host GRPC服务的客户端

type Config

type Config struct {
	Addr string
	*Authentication
}

func NewDefaultConfig

func NewDefaultConfig() *Config

Jump to

Keyboard shortcuts

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