servers

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: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckServersInCachegroups

func CheckServersInCachegroups(servers []tc.ServerInfo, cachegroups []string) error

CheckServersInCachegroups checks whether or not all the given server cachegroups belong to the topology and returns a user error (if any).

func Delete

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

Delete handler for deleting the association between a Delivery Service and a Server

func DeleteDeprecated

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

DeleteDeprecated is the deprecation handler for deleting the association between a Delivery Service and a Server.

func GetCreateHandler

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

GetCreateHandler assigns an existing Server to and existing Deliveryservice in response to api/1.1/deliveryservices/{xml_id}/servers

func GetReadAssigned

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

GetReadAssigned retrieves lists of servers based in the filter identified in the request: api/1.1/deliveryservices/{id}/servers|unassigned_servers|eligible

func GetReadUnassigned

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

GetReadUnassigned retrieves lists of servers based in the filter identified in the request: api/1.1/deliveryservices/{id}/servers|unassigned_servers|eligible

func GetReplaceHandler

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

GetReplaceHandler is the handler for POST requests to the /deliveryserviceserver API endpoint.

func ReadDSSHandler

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

ReadDSSHandler list all of the Deliveryservice Servers in response to requests to api/1.1/deliveryserviceserver$

func ReadDSSHandlerV14

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

ReadDSSHandler list all of the Deliveryservice Servers in response to requests to api/1.1/deliveryserviceserver$

func ValidateServerCapabilities

func ValidateServerCapabilities(tx *sql.Tx, dsID int, serverNamesAndTypes []tc.ServerInfo) (error, error, int)

ValidateServerCapabilities checks that the delivery service's requirements are met by each server to be assigned.

Types

type DSInfo

type DSInfo struct {
	Active               bool
	ID                   int
	Name                 string
	Type                 tc.DSType
	EdgeHeaderRewrite    *string
	MidHeaderRewrite     *string
	RegexRemap           *string
	SigningAlgorithm     *string
	CacheURL             *string
	MaxOriginConnections *int
	Topology             *string
	CDNID                *int
}

func GetDSInfo

func GetDSInfo(tx *sql.Tx, id int) (DSInfo, bool, error)

GetDSInfo loads the DeliveryService fields needed by Delivery Service Servers from the database, from the ID. Returns the data, whether the delivery service was found, and any error.

func GetDSInfoByName

func GetDSInfoByName(tx *sql.Tx, dsName string) (DSInfo, bool, error)

GetDSInfoByName loads the DeliveryService fields needed by Delivery Service Servers from the database, from the name (xml_id). Returns the data, whether the delivery service was found, and any error.

type DSServerIds

type DSServerIds struct {
	DsId    *int  `json:"dsId" db:"deliveryservice"`
	Servers []int `json:"servers"`
	Replace *bool `json:"replace"`
}

type TODSSDeliveryService

type TODSSDeliveryService struct {
	api.APIInfoImpl `json:"-"`
	tc.DeliveryServiceNullable
}

func (*TODSSDeliveryService) Read

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

Read shows all of the delivery services associated with the specified server.

type TODSServerIds

type TODSServerIds DSServerIds

type TODeliveryServiceServer

type TODeliveryServiceServer struct {
	api.APIInfoImpl `json:"-"`
	tc.DeliveryServiceServer
	TenantIDs          pq.Int64Array `json:"-" db:"accessibleTenants"`
	DeliveryServiceIDs pq.Int64Array `json:"-" db:"dsids"`
	ServerIDs          pq.Int64Array `json:"-" db:"serverids"`
}

TODeliveryServiceRequest provides a type alias to define functions on

func (*TODeliveryServiceServer) GetAuditName

func (dss *TODeliveryServiceServer) GetAuditName() string

func (TODeliveryServiceServer) GetKeyFieldsInfo

func (dss TODeliveryServiceServer) GetKeyFieldsInfo() []api.KeyFieldInfo

func (TODeliveryServiceServer) GetKeys

func (dss TODeliveryServiceServer) GetKeys() (map[string]interface{}, bool)

Implementation of the Identifier, Validator interface functions

func (*TODeliveryServiceServer) GetType

func (dss *TODeliveryServiceServer) GetType() string

func (*TODeliveryServiceServer) SetKeys

func (dss *TODeliveryServiceServer) SetKeys(keys map[string]interface{})

func (*TODeliveryServiceServer) Validate

func (dss *TODeliveryServiceServer) Validate(tx *sql.Tx) error

Validate fulfills the api.Validator interface

type TODeliveryServiceServers

type TODeliveryServiceServers tc.DeliveryServiceServers

Jump to

Keyboard shortcuts

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