Documentation ¶
Overview ¶
Package probe implements an FCM probe that will:
Initialize a new emulator and target app Send a specified number of messages to the app Attempt to verify that the app received those messages Log findings to Cloud Logger Terminate emulator and target app when finished
Index ¶
- func Control(mk utils.CommandMaker, clk utils.Timer, lg Logger)
- type Auth
- type CloudLogger
- func (c *CloudLogger) LogError(desc string)
- func (c *CloudLogger) LogErrorf(desc string, args ...interface{})
- func (c *CloudLogger) LogFatal(desc string)
- func (c *CloudLogger) LogFatalf(desc string, args ...interface{})
- func (c *CloudLogger) LogProbe(sp *sentProbe, st string, lat int, tok string)
- func (c *CloudLogger) SetError(dest string)
- func (c *CloudLogger) SetLog(dest string)
- func (c *CloudLogger) SetRegion(reg string)
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Auth ¶
type Auth struct { Token string `json:"access_token"` Ttl time.Duration `json:"expires_in,int"` TokenType string `json:"token_type"` // contains filtered or unexported fields }
Represents an authentication response, into which JSON can be parsed
type CloudLogger ¶
type CloudLogger struct { Region string // Region in which VM is located LogDest string // Location in Cloud Logger where probes should be logged ErrorDest string // Location in Cloud Logger where errors should be logged }
Logger that sends logs to cloud logger via gcloud
func NewCloudLogger ¶
func NewCloudLogger() *CloudLogger
func (*CloudLogger) LogError ¶
func (c *CloudLogger) LogError(desc string)
Log errors to specified log
func (*CloudLogger) LogErrorf ¶
func (c *CloudLogger) LogErrorf(desc string, args ...interface{})
Log errors with format
func (*CloudLogger) LogFatalf ¶
func (c *CloudLogger) LogFatalf(desc string, args ...interface{})
Log error with format and terminate
func (*CloudLogger) LogProbe ¶
func (c *CloudLogger) LogProbe(sp *sentProbe, st string, lat int, tok string)
Log probe information to specified log
func (*CloudLogger) SetRegion ¶
func (c *CloudLogger) SetRegion(reg string)
Set the region in which VM is located
type Logger ¶
type Logger interface { SetRegion(reg string) SetError(dest string) SetLog(dest string) LogProbe(sp *sentProbe, st string, lat int, tok string) LogError(desc string) LogErrorf(desc string, args ...interface{}) LogFatal(desc string) LogFatalf(desc string, args ...interface{}) }
Wrapper for logging
Click to show internal directories.
Click to hide internal directories.