global

package
v0.0.0-...-06fc2c1 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2022 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AwsS3

type AwsS3 interface {
	UploadFile(ctx context.Context, bucket, key string, data io.Reader, contentType, acl, cacheControl *string) error
	DownloadFile(ctx context.Context, bucket, key string, file io.WriterAt) error
}

type Context

type Context interface {
	context.Context
	Instances() *Instances
	Config() *configure.Config
	AddTask(n int)
	DoneTask()
	Wait()
}

func New

func New(ctx context.Context, config *configure.Config) Context

type GlobalContext

type GlobalContext struct {
	context.Context
	Insts *Instances
	Cfg   *configure.Config
	// contains filtered or unexported fields
}

func (*GlobalContext) AddTask

func (g *GlobalContext) AddTask(n int)

func (*GlobalContext) Config

func (g *GlobalContext) Config() *configure.Config

func (*GlobalContext) DoneTask

func (g *GlobalContext) DoneTask()

func (*GlobalContext) Instances

func (g *GlobalContext) Instances() *Instances

func (*GlobalContext) Wait

func (g *GlobalContext) Wait()

type Instances

type Instances struct {
	AwsS3 AwsS3
	Rmq   Rmq
}

type Rmq

type Rmq interface {
	Subscribe(name string) (<-chan amqp.Delivery, error)
	Publish(queue string, contentType string, deliveryMode uint8, msg []byte) error
	Shutdown()
}

Jump to

Keyboard shortcuts

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