Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client interface { SendRequest(method, path string, request interface{}) (int, string, error) GetURL() *url.URL CheckHealth() bool }
Client specifies the methods of any client ot the Monasca API
func NewMonascaClient ¶
NewMonascaClient creates a monasca client.
type ClientImpl ¶
type ClientImpl struct {
// contains filtered or unexported fields
}
ClientImpl implements the monasca API client interface.
func (*ClientImpl) CheckHealth ¶
func (monClient *ClientImpl) CheckHealth() bool
CheckHealth of the monasca API server.
func (*ClientImpl) GetURL ¶
func (monClient *ClientImpl) GetURL() *url.URL
GetURL of the Monasca API server.
func (*ClientImpl) SendRequest ¶
func (monClient *ClientImpl) SendRequest(method, path string, request interface{}) (int, string, error)
SendRequest to the Monasca API, authenticating on the fly. Returns 0, "", err if the request cannot be built. Returns statusCode, response, nil if communication with the server was OK.
type Config ¶
type Config struct { gophercloud.AuthOptions MonascaURL string }
Config represents the configuration of the Monasca sink.
type KeystoneClient ¶
KeystoneClient defines the interface of any client that can talk with Keystone.
func NewKeystoneClient ¶
func NewKeystoneClient(config Config) (KeystoneClient, error)
NewKeystoneClient initilizes a keystone client with the provided configuration.
type KeystoneClientImpl ¶
type KeystoneClientImpl struct {
// contains filtered or unexported fields
}
KeystoneClientImpl can authenticate with keystone and provide tokens, required for accessing the Monasca APIs.
func (*KeystoneClientImpl) GetToken ¶
func (ksClient *KeystoneClientImpl) GetToken() (string, error)
GetToken returns a valid X-Auth-Token.
func (*KeystoneClientImpl) MonascaURL ¶
func (ksClient *KeystoneClientImpl) MonascaURL() (*url.URL, error)
MonascaURL Discovers the monasca service API endpoint and returns it.