package
1.9.8
Repository: https://github.com/viant/cloudless.git
Documentation: pkg.go.dev

# README

Cloud resource utility

Asset change tracker

Asset tracker keep watching the watch URL for any change. In case modification takes place a callback is called with changed URL and resource.Operation

package mypackage;
import (
	"github.com/viant/cloudless/resource"
	"github.com/viant/afs"
	"time"
	"context"
	"fmt"
	"log"
)

func ExampleTracker_Notify() {
	watchURL := "myProto://myBucket/myFolder"
	tracker := resource.New(watchURL, time.Second)
	fs := afs.New()
	err := tracker.Notify(context.Background(), fs, func(URL string, operation resource.Operation) {
		switch operation {
		case resource.Added:
			fmt.Printf("addd :%v", URL)
		case resource.Modified:
			fmt.Printf("addd :%v", URL)
		case resource.Deleted:
			fmt.Printf("addd :%v", URL)
		}
	})
	if err != nil {
		log.Fatal(err)
	}
}

# Functions

No description provided by the author
No description provided by the author

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

Asset represents a storage asset.
No description provided by the author
No description provided by the author

# Type aliases

Assets represents storage assets.
No description provided by the author
No description provided by the author