cdn

package
v5.1.4+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2021 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 1 more Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const API_DNSSECKEYS = "DELETE /cdns/name/:name/dnsseckeys"
View Source
const CDNDNSSECKeyType = "dnssec"
View Source
const DNSSECKeyRefreshDefaultEffectiveMultiplier = uint64(10)
View Source
const DNSSECKeyRefreshDefaultGenerationMultiplier = uint64(10)
View Source
const DNSSECKeyRefreshDefaultKSKExpiration = time.Duration(365) * time.Hour * 24
View Source
const DNSSECKeyRefreshDefaultTTL = time.Duration(60) * time.Second
View Source
const DNSSECKeyRefreshDefaultZSKExpiration = time.Duration(30) * time.Hour * 24
View Source
const DNSSECStatusExisting = "existing"
View Source
const DefaultDNSSECKeyTTL = 60 * time.Second
View Source
const DefaultDSTTL = 60 * time.Second

DefaultDSTTL is the default DS Record TTL to use, if no CDN Snapshot exists, or if no tld.ttls.DS parameter exists. This MUST be the same value as Traffic Router's default. Currently: traffic_router/core/src/main/java/com/comcast/cdn/traffic_control/traffic_router/core/dns/SignatureManager.java:476 `final Long dsTtl = ZoneUtils.getLong(config.get("ttls"), "DS", 60);`. If Traffic Router and Traffic Ops differ, and a user is using the default, errors may occur! Users are advised to set the tld.ttls.DS CRConfig.json Parameter, so the default is not used! Traffic Ops functions SHOULD warn whenever this default is used.

View Source
const DefaultKSKEffectiveMultiplier = 2
View Source
const DefaultKSKExpiration = 365 * 24 * time.Hour
View Source
const DefaultKSKTTLSeconds = 60
View Source
const DefaultZSKExpiration = 30 * 24 * time.Hour
View Source
const MonitorOnlineStatus = "ONLINE"
View Source
const MonitorProxyParameter = "tm.traffic_mon_fwd_proxy"
View Source
const MonitorRequestTimeout = time.Second * 10
View Source
const RouterProfilePrefix = "CCR"

Variables

This section is empty.

Functions

func CreateDNSSECKeys

func CreateDNSSECKeys(w http.ResponseWriter, r *http.Request)

func DeleteDNSSECKeys

func DeleteDNSSECKeys(w http.ResponseWriter, r *http.Request)

func DeleteDNSSECKeysDeprecated

func DeleteDNSSECKeysDeprecated(w http.ResponseWriter, r *http.Request)

func DeleteName

func DeleteName(w http.ResponseWriter, r *http.Request)

func DomainsHandler

func DomainsHandler(w http.ResponseWriter, r *http.Request)

func GenerateKSK

func GenerateKSK(w http.ResponseWriter, r *http.Request)

func GetCapacity

func GetCapacity(w http.ResponseWriter, r *http.Request)

func GetDNSSECKeys

func GetDNSSECKeys(w http.ResponseWriter, r *http.Request)

func GetDNSSECKeysV11

func GetDNSSECKeysV11(w http.ResponseWriter, r *http.Request)

func GetDSRecordTTL

func GetDSRecordTTL(tx *sql.Tx, cdn string) (time.Duration, error)

func GetHealth

func GetHealth(w http.ResponseWriter, r *http.Request)

func GetNameHealth

func GetNameHealth(w http.ResponseWriter, r *http.Request)

func GetSSLKeys

func GetSSLKeys(w http.ResponseWriter, r *http.Request)

func IsValidCDNName

func IsValidCDNName(str string) bool

IsValidCDNName returns true if the name contains only characters valid for a CDN name

func Queue

func Queue(w http.ResponseWriter, r *http.Request)

func RefreshDNSSECKeys

func RefreshDNSSECKeys(w http.ResponseWriter, r *http.Request)

Types

type CDNDS

type CDNDS struct {
	Name        string
	Protocol    *int
	Type        tc.DSType
	RoutingName string
}

func GetCDNDeliveryServices

func GetCDNDeliveryServices(tx *sql.Tx, cdn string) ([]CDNDS, error)

getCDNDeliveryServices returns basic data for the delivery services on the given CDN, as well as the CDN name, or any error.

type CapData

type CapData struct {
	Available   float64
	Unavailable float64
	Utilized    float64
	Maintenance float64
	Capacity    float64
}

type CapacityResp

type CapacityResp struct {
	AvailablePercent   float64 `json:"availablePercent"`
	UnavailablePercent float64 `json:"unavailablePercent"`
	UtilizedPercent    float64 `json:"utilizedPercent"`
	MaintenancePercent float64 `json:"maintenancePercent"`
}

type DNSSECKeyRefreshCDNInfo

type DNSSECKeyRefreshCDNInfo struct {
	CDNName                    tc.CDNName
	CDNDomain                  string
	DNSSECEnabled              bool
	TLDTTLsDNSKEY              *uint64
	DNSKEYEffectiveMultiplier  *uint64
	DNSKEYGenerationMultiplier *uint64
}

type DNSSECKeyRefreshDSInfo

type DNSSECKeyRefreshDSInfo struct {
	DSName      tc.DeliveryServiceName
	Type        tc.DSType
	Protocol    *int
	CDNName     tc.CDNName
	CDNDomain   string
	RoutingName string
}

type TOCDN

type TOCDN struct {
	api.APIInfoImpl `json:"-"`
	tc.CDNNullable
}

we need a type alias to define functions on

func (*TOCDN) Create

func (cdn *TOCDN) Create() (error, error, int)

func (*TOCDN) Delete

func (cdn *TOCDN) Delete() (error, error, int)

func (*TOCDN) DeleteQuery

func (v *TOCDN) DeleteQuery() string

func (TOCDN) GetAuditName

func (cdn TOCDN) GetAuditName() string

func (TOCDN) GetKeyFieldsInfo

func (cdn TOCDN) GetKeyFieldsInfo() []api.KeyFieldInfo

func (TOCDN) GetKeys

func (cdn TOCDN) GetKeys() (map[string]interface{}, bool)

Implementation of the Identifier, Validator interface functions

func (*TOCDN) GetLastUpdated

func (v *TOCDN) GetLastUpdated() (*time.Time, bool, error)

func (TOCDN) GetType

func (cdn TOCDN) GetType() string

func (*TOCDN) InsertQuery

func (v *TOCDN) InsertQuery() string

func (*TOCDN) NewReadObj

func (v *TOCDN) NewReadObj() interface{}

func (*TOCDN) ParamColumns

func (v *TOCDN) ParamColumns() map[string]dbhelpers.WhereColumnInfo

func (*TOCDN) Read

func (cdn *TOCDN) Read(h http.Header, useIMS bool) ([]interface{}, error, error, int, *time.Time)

func (*TOCDN) SelectMaxLastUpdatedQuery

func (v *TOCDN) SelectMaxLastUpdatedQuery(where, orderBy, pagination, tableName string) string

func (*TOCDN) SelectQuery

func (v *TOCDN) SelectQuery() string

func (*TOCDN) SetKeys

func (cdn *TOCDN) SetKeys(keys map[string]interface{})

func (*TOCDN) SetLastUpdated

func (v *TOCDN) SetLastUpdated(t tc.TimeNoMod)

func (*TOCDN) Update

func (cdn *TOCDN) Update(h http.Header) (error, error, int)

func (*TOCDN) UpdateQuery

func (v *TOCDN) UpdateQuery() string

func (TOCDN) Validate

func (cdn TOCDN) Validate() error

Validate fulfills the api.Validator interface

type TOCDNConf

type TOCDNConf struct {
	api.APIInfoImpl `json:"-"`
}

TOCDNConf used as a type alias to define functions on to satisfy shared API REST interfaces.

func (TOCDNConf) GetType

func (v TOCDNConf) GetType() string

func (*TOCDNConf) NewReadObj

func (v *TOCDNConf) NewReadObj() interface{}

func (*TOCDNConf) ParamColumns

func (v *TOCDNConf) ParamColumns() map[string]dbhelpers.WhereColumnInfo

func (*TOCDNConf) Read

func (v *TOCDNConf) Read(h http.Header, useIMS bool) ([]interface{}, error, error, int, *time.Time)

func (*TOCDNConf) SelectMaxLastUpdatedQuery

func (v *TOCDNConf) SelectMaxLastUpdatedQuery(where, orderBy, pagination, tableName string) string

func (*TOCDNConf) SelectQuery

func (v *TOCDNConf) SelectQuery() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL