Documentation ¶
Index ¶
Constants ¶
View Source
const FMTILE_POOL_SIZE string = "FMTILE_POOL_SIZE"
FMTILE_POOL_SIZE ... Set an environment variable with this name to an integer to indicate max parallelism for tiling operations (http request + resizing image) Default is 5.
Variables ¶
This section is empty.
Functions ¶
func MakeTiledGrid ¶
MakeTiledGrid ... Returns an image.Image grid as specified by the Config. Will only fail in the case of Lastfm Api error. Otherwise, any tile specific errors will cause that tile to fill black (and be logged if enabled). See FMTILE_POOL_SIZE for concurrency control.
Types ¶
type Config ¶
type Config struct { LastfmAPIKey string // [required] LastfmPeriod string // overall|7day|1month|3month|6month|12month. Default 7day ImgSizePx int // One side of square album cover. Upscaling doesn't improve resolution. Default 300 GridSize int // One side of tiled grid. Default 3 Logger *log.Logger // Default to DevNull }
Config ... For MakeTiledGrid
Click to show internal directories.
Click to hide internal directories.