Documentation ¶
Index ¶
- Constants
- Variables
- func CreateResourceGroupIfNotExist(ctx context.Context, cfg *Config, logger *log.Logger) (err error)
- func Locations(ctx context.Context, token *adal.Token, subscriptionID string) (regions []cloud.Region, err error)
- func NewAPIError(err error) error
- func StartupScript(cfg *Config, task *script.Script) (res string, err error)
- type AuthorizedTransporter
- type BatchService
- func (s *BatchService) AvailableMachineTypes(ctx context.Context) (types []cloud.MachineType, err error)
- func (s *BatchService) AvailableOSImages(ctx context.Context) (images []string, err error)
- func (s *BatchService) CreateJob(ctx context.Context, name string) (err error)
- func (s *BatchService) CreateTask(ctx context.Context, job string, task *script.Script) (err error)
- func (s *BatchService) DeleteJob(ctx context.Context, name string) (err error)
- func (s *BatchService) DeleteTask(ctx context.Context, job, task string) (err error)
- func (s *BatchService) DisableJob(ctx context.Context, name string) (err error)
- func (s *BatchService) EnableJob(ctx context.Context, name string) (err error)
- func (s *BatchService) GetJobInfo(ctx context.Context, job string) (info *models.CloudJob, err error)
- func (s *BatchService) GetPoolInfo(ctx context.Context, name string) (info *models.CloudPool, err error)
- func (s *BatchService) Jobs(ctx context.Context) (set JobSet, err error)
- func (s *BatchService) Nodes(ctx context.Context, pool string) (nodes []*models.ComputeNode, err error)
- func (s *BatchService) Tasks(ctx context.Context, job string) (set TaskSet, err error)
- func (s *BatchService) UpdatePoolSize(ctx context.Context, name string, size int32) (err error)
- type ComputeService
- func (s *ComputeService) AvailableMachineTypes(ctx context.Context) (types []cloud.MachineType, err error)
- func (s *ComputeService) AvailableRegions(ctx context.Context) (regions []cloud.Region, err error)
- func (s *ComputeService) ImageID(ctx context.Context, publisherName, offer, skus, version string) (id string, err error)
- func (s *ComputeService) ImageOffers(ctx context.Context, publisher string) (offers []Entry, err error)
- func (s *ComputeService) ImagePublishers(ctx context.Context) (publishers []Entry, err error)
- func (s *ComputeService) ImageSkus(ctx context.Context, publisherName, offer string) (skus []Entry, err error)
- func (s *ComputeService) ImageVersions(ctx context.Context, publisherName, offer, skus string) (versions []Entry, err error)
- type Config
- type Entry
- type InstanceManager
- func (m *InstanceManager) AvailableMachineTypes(ctx context.Context) (types []cloud.MachineType, err error)
- func (m *InstanceManager) AvailableRegions(ctx context.Context) (regions []cloud.Region, err error)
- func (m *InstanceManager) CreateInstance(ctx context.Context, task *script.Script) (err error)
- func (m *InstanceManager) DeleteInstance(ctx context.Context, name string) error
- func (m *InstanceManager) Instances(ctx context.Context, handler cloud.InstanceHandler) (err error)
- type JobSet
- type LogManager
- func (m *LogManager) Delete(ctx context.Context, instanceName string) (err error)
- func (m *LogManager) Get(ctx context.Context, instanceName string, from time.Time, ...) (err error)
- func (m *LogManager) GetQueueLog(ctx context.Context, queue string, handler cloud.LogHandler) (err error)
- func (m *LogManager) GetTaskLog(ctx context.Context, queue, task string, handler cloud.LogHandler) (err error)
- type MinimalJSONProducer
- type OSInformation
- type Provider
- func (p *Provider) InstanceManager(ctx context.Context) (cloud.InstanceManager, error)
- func (p *Provider) LogManager(ctx context.Context) (cloud.LogManager, error)
- func (p *Provider) QueueManager(ctx context.Context) (cloud.QueueManager, error)
- func (p *Provider) ResourceManager(ctx context.Context) (cloud.ResourceManager, error)
- func (p *Provider) StorageManager(ctx context.Context) (cloud.StorageManager, error)
- type QueueManager
- func (m *QueueManager) CreateWorkers(ctx context.Context, queue string, n int, ...) (err error)
- func (m *QueueManager) DeleteQueue(ctx context.Context, queue string) (err error)
- func (m *QueueManager) DeleteTask(ctx context.Context, queue, task string) (err error)
- func (m *QueueManager) Enqueue(ctx context.Context, queue string, task *script.Script) (err error)
- func (m *QueueManager) Queues(ctx context.Context, handler cloud.QueueStatusHandler) (err error)
- func (m *QueueManager) Restart(ctx context.Context, queue string) error
- func (m *QueueManager) Stop(ctx context.Context, queue string) error
- func (m *QueueManager) Tasks(ctx context.Context, queue string, handler cloud.QueueManagerTaskHandler) (err error)
- func (m *QueueManager) Workers(ctx context.Context, queue string, handler cloud.QueueManagerNameHandler) (err error)
- type ResourceGroupSet
- type ResourceManager
- func (m *ResourceManager) GetMachineType() string
- func (m *ResourceManager) GetProjectID() string
- func (m *ResourceManager) GetRegion() string
- func (m *ResourceManager) MachineTypes(ctx context.Context) ([]cloud.MachineType, error)
- func (m *ResourceManager) Regions(ctx context.Context) ([]cloud.Region, error)
- func (m *ResourceManager) SetMachineType(t string)
- func (m *ResourceManager) SetProjectID(id string)
- func (m *ResourceManager) SetRegion(region string)
- type ResourceService
- func (s *ResourceService) CheckExistence(ctx context.Context, name string) bool
- func (s *ResourceService) CreateResourceGroup(ctx context.Context, name string) (err error)
- func (s *ResourceService) DeleteResourceGroup(ctx context.Context, name string) (err error)
- func (s *ResourceService) ResourceGroups(ctx context.Context) (groups ResourceGroupSet, err error)
- type StorageService
- func (s *StorageService) Delete(ctx context.Context, loc *url.URL) (err error)
- func (s *StorageService) Download(ctx context.Context, loc *url.URL, out io.Writer) (err error)
- func (s *StorageService) GetFileInfo(ctx context.Context, loc *url.URL) (info *cloud.FileInfo, err error)
- func (s *StorageService) GetMetadata(ctx context.Context, container, filename string) (metadata map[string]string, err error)
- func (s *StorageService) List(ctx context.Context, loc *url.URL, handler cloud.FileInfoHandler) (err error)
- func (s *StorageService) Upload(ctx context.Context, loc *url.URL, in io.Reader) (err error)
- func (s *StorageService) UploadWithMetadata(ctx context.Context, container, filename string, in io.Reader, ...) (err error)
- type TaskSet
Constants ¶
const ( // BatchAPIVersion defines API version of batch service. BatchAPIVersion = "2016-07-01.3.1" // RoadieAzureArchiveName is an archive name of roarie-azure command. RoadieAzureArchiveName = "roadie-azure_linux_amd64.tar.gz" // RoadieAzureVersion is the version of the job manager program. RoadieAzureVersion = "v0.3.5" )
const ( // DefaultOSPublisherName is the default publisher name of the default OS image. DefaultOSPublisherName = "Canonical" // DefaultOSOffer is the default offer of the default OS image. DefaultOSOffer = "UbuntuServer" // DefaultOSSkus is the default skus of the default OS image. DefaultOSSkus = "17.04" // DefaultOSVersion is the default version of the default version. DefaultOSVersion = "latest" // DefaultLocation is the default location. DefaultLocation = "westus" // DefaultSleepTime is the default sleeping time to wait creating or deleting // objects. DefaultSleepTime = 30 * time.Second // ComputeServiceDefaultMachineType defines the default machine type. ComputeServiceDefaultMachineType = "Standard_A2" // ComputeServiceCustomScriptExtension defines the name of custom script // extention. ComputeServiceCustomScriptExtension = "CustomScriptForLinux" // BinContainer is the name of the container where binary programs will be stored. BinContainer = "bin" // SourceContainer is the name of the container where source files will be stored. SourceContainer = "source" // DataContainer is the name of the container where data files will be stored. DataContainer = "data" // StartupContainer is the name of the container where startup files will be stored. StartupContainer = "startup" // ResultContainer is the name of the container where result files will be stored. ResultContainer = "result" // LogContainer is the name of the container where logs will be stored. LogContainer = "log" // QueuePrefix is a prefix a job which is working for a queue must has. QueuePrefix = "queue-" // TaskPrefix is a prefix a task which is working for a queue must has. TaskPrefix = "task-" )
const (
// ComputeAPIVersion defines API version of compute service.
ComputeAPIVersion = "2016-04-30-preview"
)
const ( // DefaultAccessPolicyExpiryTime defines a default expiry time. DefaultAccessPolicyExpiryTime = 30 * 24 * time.Hour )
const (
// ResourceAPIVersion defines API version of resource service.
ResourceAPIVersion = "2016-09-01"
)
const (
// StartupTemplate is the asset name of the startup template.
StartupTemplate = "assets/azure_startup.sh"
)
const (
// SubscriptionsAPIVersion defines API version of sbscriptions service.
SubscriptionsAPIVersion = "2016-06-01"
)
Variables ¶
var ( // RoadieAzureURL is a template of URL where the job manager program is published. RoadieAzureURL = fmt.Sprintf("https://github.com/jkawamoto/roadie-azure/releases/download/%v/%v", RoadieAzureVersion, RoadieAzureArchiveName) )
Functions ¶
func CreateResourceGroupIfNotExist ¶
func CreateResourceGroupIfNotExist(ctx context.Context, cfg *Config, logger *log.Logger) (err error)
CreateResourceGroupIfNotExist checks a given named resource group exists in a given subscription and location. If not exists, this function creates a new resource group.
func Locations ¶
func Locations(ctx context.Context, token *adal.Token, subscriptionID string) (regions []cloud.Region, err error)
Locations gets list of locations in a given subscription.
func NewAPIError ¶
NewAPIError creates an error which is raised from an API call.
Types ¶
type AuthorizedTransporter ¶
type AuthorizedTransporter struct { http.RoundTripper // contains filtered or unexported fields }
AuthorizedTransporter is a transporter which adds authentication information to each request before transporting it.
func NewAuthorizedTransporter ¶
func NewAuthorizedTransporter(transport http.RoundTripper, account string, key []byte) *AuthorizedTransporter
NewAuthorizedTransporter creates a new authorized transporter with a given account name and shared key.
type BatchService ¶
type BatchService struct { Config *Config Logger *log.Logger SleepTime time.Duration // contains filtered or unexported fields }
BatchService provides an interface for Azure's batch service.
func NewBatchService ¶
func NewBatchService(ctx context.Context, cfg *Config, logger *log.Logger) (service *BatchService, err error)
NewBatchService creates a new batch service interface assosiated with a given config; to authorize a authentication token is required.
func (*BatchService) AvailableMachineTypes ¶
func (s *BatchService) AvailableMachineTypes(ctx context.Context) (types []cloud.MachineType, err error)
AvailableMachineTypes returns a list of supported machine types. Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series).
func (*BatchService) AvailableOSImages ¶
func (s *BatchService) AvailableOSImages(ctx context.Context) (images []string, err error)
AvailableOSImages returns a list of available OS images.
func (*BatchService) CreateJob ¶
func (s *BatchService) CreateJob(ctx context.Context, name string) (err error)
CreateJob creates a job which has a given name.
func (*BatchService) CreateTask ¶
CreateTask adds a given task to a given named job.
func (*BatchService) DeleteJob ¶
func (s *BatchService) DeleteJob(ctx context.Context, name string) (err error)
DeleteJob deletes a given named job.
func (*BatchService) DeleteTask ¶
func (s *BatchService) DeleteTask(ctx context.Context, job, task string) (err error)
DeleteTask deletes a given named task from a given named job.
func (*BatchService) DisableJob ¶
func (s *BatchService) DisableJob(ctx context.Context, name string) (err error)
DisableJob stops a given named job.
func (*BatchService) EnableJob ¶
func (s *BatchService) EnableJob(ctx context.Context, name string) (err error)
EnableJob starts a given named job which was stopped.
func (*BatchService) GetJobInfo ¶
func (s *BatchService) GetJobInfo(ctx context.Context, job string) (info *models.CloudJob, err error)
GetJobInfo retrives the information of the given named job.
func (*BatchService) GetPoolInfo ¶
func (s *BatchService) GetPoolInfo(ctx context.Context, name string) (info *models.CloudPool, err error)
GetPoolInfo retrieves information of a given named pool.
func (*BatchService) Jobs ¶
func (s *BatchService) Jobs(ctx context.Context) (set JobSet, err error)
Jobs retrieves a set of jobs defined in the batch account specified in the configuration.
func (*BatchService) Nodes ¶
func (s *BatchService) Nodes(ctx context.Context, pool string) (nodes []*models.ComputeNode, err error)
Nodes retrieves information of compute nodes in a given named pool.
func (*BatchService) UpdatePoolSize ¶
UpdatePoolSize requests updating the size of the given named pool to size. Note that: resizing pool size is an asynchronous operation.
type ComputeService ¶
type ComputeService struct { Config *Config Logger *log.Logger // contains filtered or unexported fields }
ComputeService provides an interface for Azure's compute service.
func NewComputeService ¶
func NewComputeService(ctx context.Context, cfg *Config, logger *log.Logger) (s *ComputeService, err error)
NewComputeService creates a new compute service interface assosiated with a given configuration.
func (*ComputeService) AvailableMachineTypes ¶
func (s *ComputeService) AvailableMachineTypes(ctx context.Context) (types []cloud.MachineType, err error)
AvailableMachineTypes returns a list of available machine types.
func (*ComputeService) AvailableRegions ¶
AvailableRegions returns a list of available regions.
func (*ComputeService) ImageID ¶
func (s *ComputeService) ImageID(ctx context.Context, publisherName, offer, skus, version string) (id string, err error)
ImageID retrieves an image ID.
func (*ComputeService) ImageOffers ¶
func (s *ComputeService) ImageOffers(ctx context.Context, publisher string) (offers []Entry, err error)
ImageOffers retrieves a set of offers provided by a given publisher.
func (*ComputeService) ImagePublishers ¶
func (s *ComputeService) ImagePublishers(ctx context.Context) (publishers []Entry, err error)
ImagePublishers retrieves a set of image publishers.
func (*ComputeService) ImageSkus ¶
func (s *ComputeService) ImageSkus(ctx context.Context, publisherName, offer string) (skus []Entry, err error)
ImageSkus retrieves a set of skus provded by a given publisher and offer.
func (*ComputeService) ImageVersions ¶
func (s *ComputeService) ImageVersions(ctx context.Context, publisherName, offer, skus string) (versions []Entry, err error)
ImageVersions retrieves a set of versions provided by a given publisher, offer, and skus.
type Config ¶
type Config struct { TenantID string `yaml:"tenant_id,omitempty"` SubscriptionID string `yaml:"subscription_id,omitempty"` Location string `yaml:"location,omitempty"` ProjectID string `yaml:"project_id,omitempty"` AccountName string `yaml:"-"` MachineType string `yaml:"machine_type,omitempty"` OS OSInformation Token adal.Token }
Config defines configuration to access Azure's API.
func NewConfigFromFile ¶
NewConfigFromFile creates a new Config from a file.
func (*Config) UnmarshalYAML ¶
UnmarshalYAML unmarshals this configuration from a YAML document.
type InstanceManager ¶
type InstanceManager struct { Config *Config Logger *log.Logger // contains filtered or unexported fields }
InstanceManager implements cloud.InstanceManager interface to run a script on Azure.
func NewInstanceManager ¶
func NewInstanceManager(ctx context.Context, cfg *Config, logger *log.Logger) (m *InstanceManager, err error)
NewInstanceManager creates a new instance manager.
func (*InstanceManager) AvailableMachineTypes ¶
func (m *InstanceManager) AvailableMachineTypes(ctx context.Context) (types []cloud.MachineType, err error)
AvailableMachineTypes returns a list of available machine types.
func (*InstanceManager) AvailableRegions ¶
AvailableRegions returns a list of available regions.
func (*InstanceManager) CreateInstance ¶
CreateInstance creates an instance which has a given name.
func (*InstanceManager) DeleteInstance ¶
func (m *InstanceManager) DeleteInstance(ctx context.Context, name string) error
DeleteInstance deletes the given named instance.
func (*InstanceManager) Instances ¶
func (m *InstanceManager) Instances(ctx context.Context, handler cloud.InstanceHandler) (err error)
Instances returns a list of running instances
type LogManager ¶
type LogManager struct { Config *Config Logger *log.Logger // contains filtered or unexported fields }
LogManager defines a service interface for obtaining log entries.
func NewLogManager ¶
NewLogManager creates a new log manger for Azure.
func (*LogManager) Delete ¶
func (m *LogManager) Delete(ctx context.Context, instanceName string) (err error)
Delete instance log.
func (*LogManager) Get ¶
func (m *LogManager) Get(ctx context.Context, instanceName string, from time.Time, handler cloud.LogHandler) (err error)
Get retrievs log entries.
func (*LogManager) GetQueueLog ¶
func (m *LogManager) GetQueueLog(ctx context.Context, queue string, handler cloud.LogHandler) (err error)
GetQueueLog retrieves log of a given queue.
func (*LogManager) GetTaskLog ¶
func (m *LogManager) GetTaskLog(ctx context.Context, queue, task string, handler cloud.LogHandler) (err error)
GetTaskLog retrieves log of a given task.
type MinimalJSONProducer ¶
type MinimalJSONProducer struct {
// contains filtered or unexported fields
}
MinimalJSONProducer is a provider which marshals message bodies as a JSON object and remove null values from it.
func NewMinimalJSONProducer ¶
func NewMinimalJSONProducer() *MinimalJSONProducer
NewMinimalJSONProducer creates a new MinimalJSONProducer.
type OSInformation ¶
type OSInformation struct { PublisherName string `yaml:"publisher_name,omitempty"` Offer string `yaml:"offer,omitempty"` Skus string `yaml:"skus,omitempty"` Version string `yaml:"version,omitempty"` }
OSInformation defines OS information of creating instances.
func (*OSInformation) UnmarshalYAML ¶
func (info *OSInformation) UnmarshalYAML(unmarshal func(interface{}) error) (err error)
UnmarshalYAML unmarshals configuration form a YAML document.
type Provider ¶
Provider provides information of the service provider for Azure.
func NewProvider ¶
func NewProvider(ctx context.Context, cfg *Config, logger *log.Logger, forceAuth bool) (provider *Provider, err error)
NewProvider creates a new provider for Azure service.
func (*Provider) InstanceManager ¶
InstanceManager returns an instance manager interface.
func (*Provider) LogManager ¶
LogManager returns a log manager interface.
func (*Provider) QueueManager ¶
QueueManager returns a queue manager interface.
func (*Provider) ResourceManager ¶
ResourceManager returns a resource manager interface.
func (*Provider) StorageManager ¶
StorageManager returns a storage manager interface.
type QueueManager ¶
type QueueManager struct { Config *Config Logger *log.Logger // contains filtered or unexported fields }
QueueManager implements cloud.QueueManager interface to run a script on Azure.
func NewQueueManager ¶
func NewQueueManager(ctx context.Context, cfg *Config, logger *log.Logger) (m *QueueManager, err error)
NewQueueManager creates a new queue manager.
func (*QueueManager) CreateWorkers ¶
func (m *QueueManager) CreateWorkers(ctx context.Context, queue string, n int, handler cloud.QueueManagerNameHandler) (err error)
CreateWorkers creates worker instances working for a given named queue.
func (*QueueManager) DeleteQueue ¶
func (m *QueueManager) DeleteQueue(ctx context.Context, queue string) (err error)
DeleteQueue deletes a given named queue.
func (*QueueManager) DeleteTask ¶
func (m *QueueManager) DeleteTask(ctx context.Context, queue, task string) (err error)
DeleteTask deletes a given named task in a given named queue.
func (*QueueManager) Queues ¶
func (m *QueueManager) Queues(ctx context.Context, handler cloud.QueueStatusHandler) (err error)
Queues retrieves existing queue names.
func (*QueueManager) Restart ¶
func (m *QueueManager) Restart(ctx context.Context, queue string) error
Restart executing tasks in a given names queue.
func (*QueueManager) Stop ¶
func (m *QueueManager) Stop(ctx context.Context, queue string) error
Stop executing tasks in a given named queue.
func (*QueueManager) Tasks ¶
func (m *QueueManager) Tasks(ctx context.Context, queue string, handler cloud.QueueManagerTaskHandler) (err error)
Tasks retrieves tasks in a given names queue.
func (*QueueManager) Workers ¶
func (m *QueueManager) Workers(ctx context.Context, queue string, handler cloud.QueueManagerNameHandler) (err error)
Workers retrieves worker instance names for a given queue.
type ResourceGroupSet ¶
type ResourceGroupSet map[string]*models.ResourceGroup
ResourceGroupSet is a map of which key represents a name of a resource group and the associated value represents a resource group object.
type ResourceManager ¶
ResourceManager implements cloud.ResourceManager.
func NewResourceManager ¶
func NewResourceManager(cfg *Config, logger *log.Logger) *ResourceManager
NewResourceManager creates a new ResourceManager.
func (*ResourceManager) GetMachineType ¶
func (m *ResourceManager) GetMachineType() string
GetMachineType returns a machine type the current project uses by default.
func (*ResourceManager) GetProjectID ¶
func (m *ResourceManager) GetProjectID() string
GetProjectID returns an ID of the current project.
func (*ResourceManager) GetRegion ¶
func (m *ResourceManager) GetRegion() string
GetRegion returns a region name the current project working on.
func (*ResourceManager) MachineTypes ¶
func (m *ResourceManager) MachineTypes(ctx context.Context) ([]cloud.MachineType, error)
MachineTypes returns a set of available machine types.
func (*ResourceManager) SetMachineType ¶
func (m *ResourceManager) SetMachineType(t string)
SetMachineType sets a machine type as the default one.
func (*ResourceManager) SetProjectID ¶
func (m *ResourceManager) SetProjectID(id string)
SetProjectID sets an ID to the current project.
func (*ResourceManager) SetRegion ¶
func (m *ResourceManager) SetRegion(region string)
SetRegion sets a region to the current project.
type ResourceService ¶
type ResourceService struct { Config *Config Logger *log.Logger SleepTime time.Duration // contains filtered or unexported fields }
ResourceService provides an interface for Azure's resource management service.
func NewResourceService ¶
func NewResourceService(cfg *Config, logger *log.Logger) *ResourceService
NewResourceService creates a resource service associated with a given subscription.
func (*ResourceService) CheckExistence ¶
func (s *ResourceService) CheckExistence(ctx context.Context, name string) bool
CheckExistence checkes a given named resource group exists.
func (*ResourceService) CreateResourceGroup ¶
func (s *ResourceService) CreateResourceGroup(ctx context.Context, name string) (err error)
CreateResourceGroup creates a resource group which has a given name in a given location. The created resource group will belong to the subscription specified whtn this resource service was created.
func (*ResourceService) DeleteResourceGroup ¶
func (s *ResourceService) DeleteResourceGroup(ctx context.Context, name string) (err error)
DeleteResourceGroup deletes a given named resource group.
func (*ResourceService) ResourceGroups ¶
func (s *ResourceService) ResourceGroups(ctx context.Context) (groups ResourceGroupSet, err error)
ResourceGroups retrieves a set of resource groups belonging to the subscrption specified when this resource service was created.
type StorageService ¶
type StorageService struct { // Client of blob storage service Client storage.BlobStorageClient // Configuration Config *Config // Logger Logger *log.Logger // AccessPolicyExpiryTime defines the expiry time for accessing containers. AccessPolicyExpiryTime time.Duration }
StorageService provides an interface for Azure's storage management service.
func NewStorageService ¶
func NewStorageService(ctx context.Context, cfg *Config, logger *log.Logger) (s *StorageService, err error)
NewStorageService creates an interface of the storage service which has a given name and belongs to given subscription and location. If log.Logger logger is given, verbose mode is on and logging information will be written to the logger.
func (*StorageService) Download ¶
Download a file associated from a given location and write it to a given writer.
func (*StorageService) GetFileInfo ¶
func (s *StorageService) GetFileInfo(ctx context.Context, loc *url.URL) (info *cloud.FileInfo, err error)
GetFileInfo gets information of file in a given location.
func (*StorageService) GetMetadata ¶
func (s *StorageService) GetMetadata(ctx context.Context, container, filename string) (metadata map[string]string, err error)
GetMetadata retrives metadata of a given named file.
func (*StorageService) List ¶
func (s *StorageService) List(ctx context.Context, loc *url.URL, handler cloud.FileInfoHandler) (err error)
List up files matching a given prefix. It takes a handler; information of found files are sent to it.
func (*StorageService) UploadWithMetadata ¶
func (s *StorageService) UploadWithMetadata( ctx context.Context, container, filename string, in io.Reader, props *storage.BlobProperties, metadata storage.BlobMetadata) (err error)
UploadWithMetadata a given stream in a given container as a file named a given file name.