Documentation ¶
Index ¶
- Constants
- Variables
- func Connect(connConfig Config, suppressRegister bool, ...) bool
- func Disconnect() bool
- func EmitErrorEvent(jobName string, funcName string, err error)
- func EmitErrorEventKv(jobName string, funcName string, err error, kv map[string]string)
- func FuncClientSingleton(funcName string, request interface{}) (interface{}, error)
- func GroupLogin() bool
- func IsEmergencyMode() bool
- func LoadCount() int
- func Login() bool
- func Reset()
- func ResetEmergencyMode()
- type AnalyticsRecord
- type Config
- type GeoData
- type Purger
Constants ¶
View Source
const ( ClientSingletonCall = "gorpcClientCall" FuncClientSingletonCall = "gorpcDispatcherClientCall" )
Variables ¶
Functions ¶
func Connect ¶
func Connect(connConfig Config, suppressRegister bool, dispatcherFuncs map[string]interface{}, getGroupLoginFunc func(string, string) interface{}, emergencyModeFunc func(), emergencyModeLoadedFunc func()) bool
Connect will establish a connection to the RPC server specified in connection options
func Disconnect ¶
func Disconnect() bool
func EmitErrorEvent ¶
func EmitErrorEventKv ¶
func FuncClientSingleton ¶
func GroupLogin ¶
func GroupLogin() bool
func IsEmergencyMode ¶
func IsEmergencyMode() bool
func ResetEmergencyMode ¶
func ResetEmergencyMode()
Types ¶
type AnalyticsRecord ¶
type AnalyticsRecord struct { Method string Path string RawPath string ContentLength int64 UserAgent string Day int Month time.Month Year int Hour int ResponseCode int APIKey string TimeStamp time.Time APIVersion string APIName string APIID string OrgID string OauthID string RequestTime int64 RawRequest string RawResponse string IPAddress string Geo GeoData Tags []string Alias string TrackPath bool ExpireAt time.Time `bson:"expireAt" json:"expireAt"` }
type Config ¶
type Config struct { UseSSL bool `json:"use_ssl"` SSLInsecureSkipVerify bool `json:"ssl_insecure_skip_verify"` ConnectionString string `json:"connection_string"` RPCKey string `json:"rpc_key"` APIKey string `json:"api_key"` GroupID string `json:"group_id"` CallTimeout int `json:"call_timeout"` PingTimeout int `json:"ping_timeout"` RPCPoolSize int `json:"rpc_pool_size"` }
type GeoData ¶
type GeoData struct { Country struct { ISOCode string `maxminddb:"iso_code"` } `maxminddb:"country"` City struct { GeoNameID uint `maxminddb:"geoname_id"` Names map[string]string `maxminddb:"names"` } `maxminddb:"city"` Location struct { Latitude float64 `maxminddb:"latitude"` Longitude float64 `maxminddb:"longitude"` TimeZone string `maxminddb:"time_zone"` } `maxminddb:"location"` }
type Purger ¶
RPCPurger will purge analytics data into a Mongo database, requires that the Mongo DB string is specified in the Config object
func (*Purger) PurgeCache ¶
func (r *Purger) PurgeCache()
PurgeCache will pull the data from the in-memory store and drop it into the specified MongoDB collection
Click to show internal directories.
Click to hide internal directories.