origin

package
v0.1.16 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultOrigin added in v0.1.5

type DefaultOrigin struct {
	Host string
	URL  url.URL
}

DefaultOrigin struct holds Origin and Path of DefaultOrigin Variant level DefaultOrigins will be base64 encoded absolute Urls

func NewDefaultOrigin added in v0.1.5

func NewDefaultOrigin(host string, p string) (*DefaultOrigin, error)

NewDefaultOrigin returns a new Origin struct host is not required if path is absolute

func (*DefaultOrigin) FetchOriginContent added in v0.1.14

func (d *DefaultOrigin) FetchOriginContent(ctx context.Context, c config.Client) (OriginContentInfo, error)

FetchOriginContent will grab DefaultOrigin contents of configured origin

func (*DefaultOrigin) GetPlaybackURL added in v0.1.5

func (d *DefaultOrigin) GetPlaybackURL() string

GetPlaybackURL will retrieve url

type Origin

type Origin interface {
	GetPlaybackURL() string
	FetchOriginContent(ctx context.Context, c config.Client) (OriginContentInfo, error)
}

Origin interface is implemented by DefaultOrigin and Propeller struct

func Configure

func Configure(ctx context.Context, c config.Config, path string) (Origin, error)

Configure will return proper Origin interface

type OriginContentInfo added in v0.1.14

type OriginContentInfo struct {
	Payload      string
	LastModified time.Time
	Status       int
}

OriginContentInfo holds http response info from manifest request

type Propeller

type Propeller struct {
	URL string
}

Propeller Origin holds the URL of a propeller entity (Channel, Clip)

func NewPropeller

func NewPropeller(ctx context.Context, c config.Config, getter urlGetter) (*Propeller, error)

NewPropeller returns a Propeller origin struct

func (*Propeller) FetchOriginContent added in v0.1.14

func (p *Propeller) FetchOriginContent(ctx context.Context, c config.Client) (OriginContentInfo, error)

FetchOriginContent will grab manifest contents of configured origin

func (*Propeller) GetPlaybackURL

func (p *Propeller) GetPlaybackURL() string

GetPlaybackURL will retrieve url

Jump to

Keyboard shortcuts

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