Versions in this module Expand all Collapse all v1 v1.2.5 Sep 23, 2024 Changes in this version + const RequestAppInstLatency + const VeryCloseDistanceKm + var AppInstClientKeyCache edgeproto.AppInstClientKeyCache + var ClientSender *notify.AppInstClientSend + var DefaultLocationRangeMap = map[uint32]LocationResult + var InfiniteDistance float64 = 100000 + var Jwks vault.JWKS + var LatencyTimes = []time.Duration + var LocationMismatchOtherCountry uint32 = 5 + var LocationMismatchSameCountry uint32 = 4 + var LocationRoamingCountryMatch uint32 = 6 + var LocationRoamingCountryMismatch uint32 = 7 + var LocationUnknown uint32 = 0 + var LocationVerifiedFar uint32 = 3 + var LocationVerifiedMedium uint32 = 2 + var LocationVerifiedNear uint32 = 1 + var MyCloudletKey edgeproto.CloudletKey + var OptionFindCloudletRandomizeVeryClose bool = true + var PlatformClientsCache edgeproto.DeviceCache + var RateLimitMgr *ratelimit.RateLimitManager + var ScaleID = flag.String("scaleID", "", ...) + var Settings edgeproto.Settings + var StatKeyContextKey = StatKeyContextType("statKey") + func AddApp(ctx context.Context, in *edgeproto.App) + func AddAppInst(ctx context.Context, appInst *edgeproto.AppInst) + func ApiStatToMetric(ts *types.Timestamp, key *StatKey, stat *ApiStat) *edgeproto.Metric + func AppExists(orgname string, appname string, appvers string) bool + func AreStatesUsable(maintenanceState dme.MaintenanceState, cloudletState dme.CloudletState, ...) bool + func ConstructFindCloudletReplyFromDmeAppInst(ctx context.Context, appinst *DmeAppInst, clientloc *dme.Loc, ...) + func CustomStatToMetric(ts *types.Timestamp, key CustomStatKey, stat *CustomStat) *edgeproto.Metric + func DeleteCloudletInfo(ctx context.Context, cloudletKey *edgeproto.CloudletKey) + func DeviceStatToMetric(ts *types.Timestamp, key DeviceStatKey, stat *DeviceStat) *edgeproto.Metric + func DistanceBetween(loc1, loc2 dme.Loc) float64 + func GenerateAuthToken(privKeyFile string, appOrg string, appname string, appvers string, ...) (string, error) + func GenerateCookie(key *CookieKey, ctx context.Context, cookieExpiration *time.Duration) (string, error) + func GenerateEdgeEventsCookie(key *EdgeEventsCookieKey, ctx context.Context, cookieExpiration time.Duration) (string, error) + func GetAppInstList(ctx context.Context, ckey *CookieKey, mreq *dme.AppInstListRequest, ...) + func GetAppOfficialFqdn(ctx context.Context, ckey *CookieKey, mreq *dme.AppOfficialFqdnRequest, ...) + func GetAuthPublicKey(orgname string, appname string, appvers string) (string, error) + func GetFqdnList(mreq *dme.FqdnListRequest, clist *dme.FqdnListReply) + func GetLocationResultForDistance(distance float64) uint32 + func GetLocationTileFromGpsLocation(loc *dme.Loc, locationTileSideLengthKm int) string + func GetStreamAuthInterceptor() grpc.StreamServerInterceptor + func InitAppInstClients(timeout time.Duration) + func InitVault(addr, region string, done chan struct{}) error + func IsAppInstUsable(appInst *DmeAppInst) bool + func IsTheSameCluster(key1 *EdgeEventsCookieKey, key2 *EdgeEventsCookieKey) bool + func LatencyStatToMetric(ts *types.Timestamp, key LatencyStatKey, stat *LatencyStat) *edgeproto.Metric + func ListAppinstTbl(ctx context.Context) + func MetricToStat(metric *edgeproto.Metric) (*StatKey, *ApiStat) + func NewCookieContext(ctx context.Context, ckey *CookieKey) context.Context + func NewEdgeEventsCookieContext(ctx context.Context, eekey *EdgeEventsCookieKey) context.Context + func PeerContext(ctx context.Context, ip string, port int, span opentracing.Span) context.Context + func PruneAppInsts(ctx context.Context, appInsts map[edgeproto.AppInstKey]struct{}) + func PruneApps(ctx context.Context, apps map[edgeproto.AppKey]struct{}) + func PruneCloudlets(ctx context.Context, cloudlets map[edgeproto.CloudletKey]struct{}) + func PruneInstsCloudletState(ctx context.Context, cloudlets map[edgeproto.CloudletKey]struct{}) + func PurgeAppInstClients(ctx context.Context, appInstKey *edgeproto.AppInstKey, ...) + func RecordDevice(ctx context.Context, req *dme.RegisterClientRequest) + func RemoveApp(ctx context.Context, in *edgeproto.App) + func RemoveAppInst(ctx context.Context, appInst *edgeproto.AppInst) + func SearchAppInsts(ctx context.Context, carrierName string, app *DmeApp, loc *dme.Loc, ...) []*foundAppInst + func SendCachedClients(ctx context.Context, old *edgeproto.AppInstClientKey, ...) + func SetInstStateFromCloudlet(ctx context.Context, in *edgeproto.Cloudlet) + func SetInstStateFromCloudletInfo(ctx context.Context, info *edgeproto.CloudletInfo) + func SettingsUpdated(ctx context.Context, old *edgeproto.Settings, new *edgeproto.Settings) + func SetupMatchEngine(eehandler EdgeEventsHandler) + func StopAppInstClients() + func StreamEdgeEvent(ctx context.Context, svr dme.MatchEngineApi_StreamEdgeEventServer, ...) (reterr error) + func UnaryAuthInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (interface{}, error) + func UpdateClientsBuffer(ctx context.Context, msg *edgeproto.AppInstClient) + func ValidateLocation(loc *dme.Loc) error + func VerifyAuthToken(ctx context.Context, token string, pubkey string, devname string, ...) error + type ApiStat struct + type ApiStatCall struct + Fail bool + Key StatKey + Latency time.Duration + type AutoProvCounts struct + type AutoProvPolicy struct + Cloudlets map[string][]*edgeproto.AutoProvCloudlet + DeployClientCount uint32 + IntervalCount uint32 + Name string + type AutoProvPolicyHandler struct + func (s *AutoProvPolicyHandler) Delete(ctx context.Context, in *edgeproto.AutoProvPolicy, rev int64) + func (s *AutoProvPolicyHandler) Flush(ctx context.Context, notifyId int64) + func (s *AutoProvPolicyHandler) Prune(ctx context.Context, keys map[edgeproto.PolicyKey]struct{}) + func (s *AutoProvPolicyHandler) Update(ctx context.Context, in *edgeproto.AutoProvPolicy, rev int64) + type AutoProvStats struct + func InitAutoProvStats(intervalSec, offsetSec float64, numShards uint, nodeKey *edgeproto.NodeKey, ...) *AutoProvStats + func (s *AutoProvStats) Clear(appKey *edgeproto.AppKey, policy string) + func (s *AutoProvStats) Increment(ctx context.Context, appKey *edgeproto.AppKey, ...) + func (s *AutoProvStats) Prune(apps map[edgeproto.AppKey]struct{}) + func (s *AutoProvStats) RunNotify() + func (s *AutoProvStats) Start() + func (s *AutoProvStats) Stop() + func (s *AutoProvStats) UpdateSettings(intervalSec float64) + type AutoProvStatsShard struct + type ClientToken struct + AppKey edgeproto.AppKey + Location dme.Loc + func GetClientDataFromToken(token string) (*ClientToken, error) + type ClientsMap struct + func (m *ClientsMap) UpdateClientTimeout(new edgeproto.Duration) + type CookieKey struct + AppName string + AppVers string + Kid int + OrgName string + PeerIP string + UniqueId string + UniqueIdType string + func CookieFromContext(ctx context.Context) (ckey *CookieKey, ok bool) + func VerifyCookie(ctx context.Context, cookie string) (*CookieKey, error) + type CustomStat struct + Changed bool + Count uint64 + Mux sync.Mutex + RollingStatistics *grpcstats.RollingStatistics + func NewCustomStat() *CustomStat + func (c *CustomStat) Update(info *CustomStatInfo) + type CustomStatInfo struct + Samples []*dme.Sample + type CustomStatKey struct + AppInstKey edgeproto.AppInstKey + AppKey edgeproto.AppKey + CloudletKey edgeproto.CloudletKey + Name string + func GetCustomStatKey(appInst *edgeproto.AppInst, statName string) CustomStatKey + type DeviceInfo struct + DeviceInfoDynamic *dme.DeviceInfoDynamic + DeviceInfoStatic *dme.DeviceInfoStatic + type DeviceStat struct + Changed bool + Mux sync.Mutex + NumSessions uint64 + func NewDeviceStat() *DeviceStat + func (d *DeviceStat) Update() + type DeviceStatKey struct + AppInstKey edgeproto.AppInstKey + AppKey edgeproto.AppKey + CloudletKey edgeproto.CloudletKey + DataNetworkType string + DeviceCarrier string + DeviceModel string + DeviceOs string + LocationTile string + SignalStrength uint64 + func GetDeviceStatKey(appInst *edgeproto.AppInst, deviceInfo *DeviceInfo, loc *dme.Loc, ...) DeviceStatKey + type DmeApp struct + AndroidPackageName string + AppKey edgeproto.AppKey + AuthPublicKey string + AutoProvPolicies map[string]*AutoProvPolicy + Carriers map[string]*DmeAppInsts + DefaultFlavor string + Deployment string + OfficialFqdn string + Ports []dme.AppPort + QosSessionDuration time.Duration + QosSessionProfile string + func FindCloudlet(ctx context.Context, appkey *edgeproto.AppKey, carrier string, loc *dme.Loc, ...) (error, *DmeApp) + type DmeAppInst struct + AppInstHealth dme.HealthCheck + CloudletState dme.CloudletState + Location dme.Loc + MaintenanceState dme.MaintenanceState + TrackedState edgeproto.TrackedState + Uri string + func (s *DmeAppInst) GetCloudletKey() *edgeproto.CloudletKey + type DmeAppInstState struct + AppInstHealth dme.HealthCheck + CloudletState dme.CloudletState + MaintenanceState dme.MaintenanceState + type DmeAppInsts struct + AllianceInsts map[edgeproto.AppInstKey]*DmeAppInst + Insts map[edgeproto.AppInstKey]*DmeAppInst + type DmeApps struct + AppInstApps map[edgeproto.AppInstKey]edgeproto.AppKey + Apps map[edgeproto.AppKey]*DmeApp + AutoProvPolicies map[edgeproto.PolicyKey]*AutoProvPolicy + CarriersByAppInst map[edgeproto.AppInstKey]edgeproto.CloudletKey + Cloudlets map[edgeproto.CloudletKey]*DmeCloudlet + FreeReservableClusterInsts edgeproto.FreeReservableClusterInstCache + OperatorCodes edgeproto.OperatorCodeCache + var DmeAppTbl *DmeApps + type DmeCloudlet struct + AllianceCarriers map[string]struct{} + AppInstKeys map[edgeproto.AppInstKey]*edgeproto.AppKey + CloudletKey edgeproto.CloudletKey + GpsLocation dme.Loc + MaintenanceState dme.MaintenanceState + State dme.CloudletState + type DmeStats struct + var Stats *DmeStats + func NewDmeStats(interval time.Duration, numShards uint, ...) *DmeStats + func (s *DmeStats) GetStreamStatsInterceptor() grpc.StreamServerInterceptor + func (s *DmeStats) RecordApiStatCall(call *ApiStatCall) + func (s *DmeStats) RunNotify() + func (s *DmeStats) Start() + func (s *DmeStats) Stop() + func (s *DmeStats) UnaryStatsInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (interface{}, error) + func (s *DmeStats) UpdateSettings(interval time.Duration) + type EdgeEventMapShard struct + type EdgeEventStatCall struct + CustomStatInfo *CustomStatInfo + CustomStatKey CustomStatKey + DeviceStatKey DeviceStatKey + LatencyStatInfo *LatencyStatInfo + LatencyStatKey LatencyStatKey + Metric string + type EdgeEventStats struct + var EEStats *EdgeEventStats + func NewEdgeEventStats(interval time.Duration, numShards uint, ...) *EdgeEventStats + func (e *EdgeEventStats) RecordEdgeEventStatCall(call *EdgeEventStatCall) + func (e *EdgeEventStats) RunNotify() + func (e *EdgeEventStats) Start() + func (e *EdgeEventStats) Stop() + func (e *EdgeEventStats) UpdateSettings(newinterval time.Duration) + type EdgeEventsCookieKey struct + AppInstName string + CloudletName string + CloudletOrg string + ClusterName string + ClusterOrg string + Kid int + Location dme.Loc + func CreateEdgeEventsCookieKey(appInst *DmeAppInst, loc dme.Loc) *EdgeEventsCookieKey + func EdgeEventsCookieFromContext(ctx context.Context) (eekey *EdgeEventsCookieKey, ok bool) + func VerifyEdgeEventsCookie(ctx context.Context, cookie string) (*EdgeEventsCookieKey, error) + type EdgeEventsHandler interface + AddClient func(ctx context.Context, appInstKey edgeproto.AppInstKey, cookieKey CookieKey, ...) + GetVersionProperties func(ctx context.Context) map[string]string + ProcessLatencySamples func(ctx context.Context, appInstKey edgeproto.AppInstKey, cookieKey CookieKey, ...) (*dme.Statistics, error) + RemoveAppInst func(ctx context.Context, appInstKey edgeproto.AppInstKey) + RemoveClient func(ctx context.Context, appInstKey edgeproto.AppInstKey, cookieKey CookieKey) + SendAppInstStateEdgeEvent func(ctx context.Context, appinstState *DmeAppInstState, ...) + SendAvailableAppInst func(ctx context.Context, app *DmeApp, newAppInstKey edgeproto.AppInstKey, ...) + SendCloudletMaintenanceStateEdgeEvent func(ctx context.Context, appinstState *DmeAppInstState, ...) + SendCloudletStateEdgeEvent func(ctx context.Context, appinstState *DmeAppInstState, ...) + SendEdgeEventToClient func(ctx context.Context, serverEdgeEvent *dme.ServerEdgeEvent, ...) + SendLatencyRequestEdgeEvent func(ctx context.Context, appInstKey edgeproto.AppInstKey) + UpdateClientCarrier func(ctx context.Context, appInstKey edgeproto.AppInstKey, cookieKey CookieKey, ...) + UpdateClientLastLocation func(ctx context.Context, appInstKey edgeproto.AppInstKey, cookieKey CookieKey, ...) + var EEHandler EdgeEventsHandler + type EmptyEdgeEventsHandler struct + func (e *EmptyEdgeEventsHandler) AddClient(ctx context.Context, appInstKey edgeproto.AppInstKey, cookieKey CookieKey, ...) + func (e *EmptyEdgeEventsHandler) GetVersionProperties(ctx context.Context) map[string]string + func (e *EmptyEdgeEventsHandler) ProcessLatencySamples(ctx context.Context, appInstKey edgeproto.AppInstKey, cookieKey CookieKey, ...) (*dme.Statistics, error) + func (e *EmptyEdgeEventsHandler) RemoveAppInst(ctx context.Context, appInstKey edgeproto.AppInstKey) + func (e *EmptyEdgeEventsHandler) RemoveClient(ctx context.Context, appInstKey edgeproto.AppInstKey, cookieKey CookieKey) + func (e *EmptyEdgeEventsHandler) RemoveCloudlet(ctx context.Context, cloudletKey edgeproto.CloudletKey) + func (e *EmptyEdgeEventsHandler) SendAppInstStateEdgeEvent(ctx context.Context, appinstState *DmeAppInstState, ...) + func (e *EmptyEdgeEventsHandler) SendAvailableAppInst(ctx context.Context, app *DmeApp, newAppInstKey edgeproto.AppInstKey, ...) + func (e *EmptyEdgeEventsHandler) SendCloudletMaintenanceStateEdgeEvent(ctx context.Context, appinstState *DmeAppInstState, ...) + func (e *EmptyEdgeEventsHandler) SendCloudletStateEdgeEvent(ctx context.Context, appinstState *DmeAppInstState, ...) + func (e *EmptyEdgeEventsHandler) SendEdgeEventToClient(ctx context.Context, serverEdgeEvent *dme.ServerEdgeEvent, ...) + func (e *EmptyEdgeEventsHandler) SendLatencyRequestEdgeEvent(ctx context.Context, appInstKey edgeproto.AppInstKey) + func (e *EmptyEdgeEventsHandler) UpdateClientCarrier(ctx context.Context, appInstKey edgeproto.AppInstKey, cookieKey CookieKey, ...) + func (e *EmptyEdgeEventsHandler) UpdateClientLastLocation(ctx context.Context, appInstKey edgeproto.AppInstKey, cookieKey CookieKey, ...) + type LatencyStat struct + Changed bool + LatencyBuckets []time.Duration + LatencyCounts grpcstats.LatencyMetric + Mux sync.Mutex + RollingStatistics *grpcstats.RollingStatistics + func NewLatencyStat(latencyBuckets []time.Duration) *LatencyStat + func (l *LatencyStat) ResetLatencyStat() + func (l *LatencyStat) Update(info *LatencyStatInfo) + type LatencyStatInfo struct + Samples []*dme.Sample + type LatencyStatKey struct + AppInstKey edgeproto.AppInstKey + AppKey edgeproto.AppKey + CloudletKey edgeproto.CloudletKey + DataNetworkType string + DeviceCarrier string + DeviceModel string + DeviceOs string + LocationTile string + SignalStrength uint64 + func GetLatencyStatKey(appInst *edgeproto.AppInst, deviceInfo *DeviceInfo, loc *dme.Loc, ...) LatencyStatKey + type LocationResult struct + DistanceRange float64 + MatchEngineLocStatus dme.VerifyLocationReply_GPSLocationStatus + func GetDistanceAndStatusForLocationResult(locationResult uint32) LocationResult + type LocationTileInfo struct + LatIndex int + LongIndex int + Quadrant int + TileLength int + type MapShard struct + type ServerStreamWrapper struct + func (s *ServerStreamWrapper) Context() context.Context + func (s *ServerStreamWrapper) RecvMsg(m interface{}) error + func (s *ServerStreamWrapper) SendMsg(m interface{}) error + type StatKey struct + AppKey edgeproto.AppKey + CloudletFound edgeproto.CloudletKey + Method string + type StatKeyContextType string + type StatsStreamWrapper struct + func (w *StatsStreamWrapper) Context() context.Context + func (w *StatsStreamWrapper) RecvMsg(m interface{}) error + func (w *StatsStreamWrapper) SendMsg(m interface{}) error