imgsvr

package
v0.0.0-...-57214d0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2015 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CmdStrip            = "s"
	CmdFormat           = "f"
	CmdResize           = "resize"
	CmdQuality          = "q"
	CmdWaterMark        = "m"
	CmdRotate           = "rotate"
	CmdDigitalWatermark = "d"
)
View Source
var (
	Image       = "Image"
	Hotel       = "hotel"
	Globalhotel = "globalhotel"
	TG          = "tg"
	Reboot      = "Reboot"
	CatInstance cat.Cat

	WorkerPort string
)

Functions

func CycleHandleImage

func CycleHandleImage()

func FindStorage

func FindStorage(params map[string]string, Cat cat.Cat) (storage.Storage, string, error)

func GetHttp

func GetHttp(url string) ([]byte, error)

func GetIP

func GetIP() string

func GetImage

func GetImage(storageType string, path string, Cat cat.Cat) ([]byte, error)

func GetImageSizeDistribution

func GetImageSizeDistribution(size int) string

func GetStorage

func GetStorage(storageType string, path string, Cat cat.Cat) (storage.Storage, error)

func JoinString

func JoinString(args ...string) string

func KillProcessByPort

func KillProcessByPort(port string) error

func LogErrorEvent

func LogErrorEvent(cat cat.Cat, name string, err string)

func LogEvent

func LogEvent(cat cat.Cat, title string, name string, data map[string]string)

func ModifyNginxconf

func ModifyNginxconf(path string, listenPort string, ports map[string]int) error

func ParseUri

func ParseUri(path string) (string, string, string)

sourceType, channel, path

func PostHttp

func PostHttp(uri string, data url.Values) ([]byte, error)

func RestartNginx

func RestartNginx(path string) error

Types

type Handler

type Handler struct {
	ChainBuilder *ProcChainBuilder
}

func (*Handler) ServeHTTP

func (handler *Handler) ServeHTTP(writer http.ResponseWriter, request *http.Request)

type HostProcessor

type HostProcessor struct {
	Port        int
	ThreadCount int
	NginxPath   string
	NginxPort   string
}

func (*HostProcessor) ModifyNginxconf

func (this *HostProcessor) ModifyNginxconf()

func (*HostProcessor) ReloadConf

func (this *HostProcessor) ReloadConf()

func (*HostProcessor) Run

func (this *HostProcessor) Run()

func (*HostProcessor) Stop

func (this *HostProcessor) Stop()

type ProcChainBuilder

type ProcChainBuilder struct {
	Cat cat.Cat
}

func (*ProcChainBuilder) Build

func (this *ProcChainBuilder) Build(params map[string]string) (*proc.ProcessorChain, *buildError)

func (*ProcChainBuilder) DigimarkProcChain

func (this *ProcChainBuilder) DigimarkProcChain(params map[string]string) (*proc.ProcessorChain, *buildError)

type SubProcessor

type SubProcessor struct {
	Port     string
	HostPort string
}

func (*SubProcessor) Run

func (this *SubProcessor) Run()

Directories

Path Synopsis
nfs

Jump to

Keyboard shortcuts

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