Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DialOptions ¶
func DialOptions(cfg ProxyConfig) ([]grpc.DialOption, error)
DialOptions of a ProxyConfig, will return all the gRPC client options like timeout, etc...
Types ¶
type Client ¶
type Client struct { Spotify spotify.SpotifyClient Collection collection.CollectionClient }
Client to all the diskr services
func NewClient ¶
func NewClient(config ...Configuration) (*Client, error)
NewClient bootsrap a new client based on environment variables
func NewClientFromEnv ¶
NewClientFromEnv automatically bootstrap a new gateway client based on env variables
type Config ¶
type Config struct { Spotify ProxyConfig Collection ProxyConfig }
Config for any kind of gateway that proxy requests to Diskr services
type Configuration ¶
Configuration function for a gateway client
func WithCollection ¶
func WithCollection(config ProxyConfig) Configuration
WithCollection create a new gRPC connection to the collection service
func WithSpotify ¶
func WithSpotify(config ProxyConfig) Configuration
WithSpotify create a new gRPC connection to the collection service
type ProxyConfig ¶
type ProxyConfig struct { Target string `required:"true"` Timeout string `default:"1s"` Insecure bool `default:"true"` }
ProxyConfig define the options used to contact a gRPC service
func (ProxyConfig) Conn ¶
func (pc ProxyConfig) Conn() (*grpc.ClientConn, error)
Conn create a new gRPC connection to the given proxy
Click to show internal directories.
Click to hide internal directories.