Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientSet ¶
type ClientSet struct {
// contains filtered or unexported fields
}
func (*ClientSet) Permission ¶
func (c *ClientSet) Permission() permission.RPCClient
permission rpc 客户端
type Config ¶
type Config struct { Address string `json:"adress" toml:"adress" yaml:"adress" env:"MCENTER_GRPC_ADDRESS"` // 客户端认证 ClientID string `json:"client_id" toml:"client_id" yaml:"client_id" env:"MCENTER_CLINET_ID"` ClientSecret string `json:"client_secret" toml:"client_secret" yaml:"client_secret" env:"MCENTER_CLIENT_SECRET"` // 默认值10秒 TimeoutSecond uint `json:"timeout_second" toml:"timeout_second" yaml:"timeout_second" env:"MCENTER_GRPC_TIMEOUT_SECOND"` }
Config 客户端配置
func (*Config) GetRequestMetadata ¶
GetRequestMetadata gets the current request metadata, refreshing tokens if required. This should be called by the transport layer on each request, and the data should be populated in headers or other context. If a status code is returned, it will be used as the status for the RPC (restricted to an allowable set of codes as defined by gRFC A54). uri is the URI of the entry point for the request. When supported by the underlying implementation, ctx can be used for timeout and cancellation. Additionally, RequestInfo data will be available via ctx to this call. TODO(zhaoq): Define the set of the qualified keys instead of leaving it as an arbitrary string.
func (*Config) RequireTransportSecurity ¶
RequireTransportSecurity indicates whether the credentials requires transport security.