yolosvc

package
v2.30.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2020 License: Apache-2.0 Imports: 49 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BintrayWorkerOpts

type BintrayWorkerOpts struct {
	Logger     *zap.Logger
	LoopAfter  time.Duration
	ClearCache *abool.AtomicBool
	Once       bool
}

type BuildkiteWorkerOpts

type BuildkiteWorkerOpts struct {
	Logger     *zap.Logger
	MaxBuilds  int
	LoopAfter  time.Duration
	ClearCache *abool.AtomicBool
	Once       bool
}

type CircleciWorkerOpts

type CircleciWorkerOpts struct {
	Logger     *zap.Logger
	MaxBuilds  int
	LoopAfter  time.Duration
	ClearCache *abool.AtomicBool
	Once       bool
}

type GithubWorkerOpts added in v2.16.0

type GithubWorkerOpts struct {
	Logger     *zap.Logger
	MaxBuilds  int
	LoopAfter  time.Duration
	ClearCache *abool.AtomicBool
	Once       bool
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(ctx context.Context, svc Service, opts ServerOpts) (*Server, error)

func (*Server) Start

func (srv *Server) Start() error

func (*Server) Stop

func (srv *Server) Stop()

type ServerOpts

type ServerOpts struct {
	Logger             *zap.Logger
	HTTPBind           string
	GRPCBind           string
	CORSAllowedOrigins string
	RequestTimeout     time.Duration
	ShutdownTimeout    time.Duration
	BasicAuth          string
	Realm              string
	AuthSalt           string
	DevMode            bool
	ClearCache         *abool.AtomicBool
	WithCache          bool
}

type Service

type Service interface {
	yolopb.YoloServiceServer
	PlistGenerator(w http.ResponseWriter, r *http.Request)
	ArtifactDownloader(w http.ResponseWriter, r *http.Request)

	GitHubWorker(ctx context.Context, opts GithubWorkerOpts) error
	BuildkiteWorker(ctx context.Context, opts BuildkiteWorkerOpts) error
	CircleciWorker(ctx context.Context, opts CircleciWorkerOpts) error
	BintrayWorker(ctx context.Context, opts BintrayWorkerOpts) error
}

func NewService

func NewService(db *gorm.DB, opts ServiceOpts) (Service, error)

type ServiceOpts

type ServiceOpts struct {
	BuildkiteClient *buildkite.Client
	CircleciClient  *circleci.Client
	BintrayClient   *bintray.Client
	GithubClient    *github.Client
	Logger          *zap.Logger
	AuthSalt        string
	DevMode         bool
	ClearCache      *abool.AtomicBool
}

Jump to

Keyboard shortcuts

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