func NewVisibilityArchiver(container *archiver.VisibilityBootstrapContainer, config *config.GstorageArchiver) (archiver.VisibilityArchiver, error) {
	storage, err := connector.NewClient(context.Background(), config)
	return newVisibilityArchiver(container, storage), err
}
NewVisibilityArchiver creates a new archiver.VisibilityArchiver based on filestore
package gcloud
import (
	"context"
	"errors"
	"fmt"
	"path/filepath"
	"time"
	"go.temporal.io/api/serviceerror"
	"go.temporal.io/server/common/searchattribute"
	archiverspb "go.temporal.io/server/api/archiver/v1"
	"go.temporal.io/server/common/archiver"
	"go.temporal.io/server/common/archiver/gcloud/connector"
	"go.temporal.io/server/common/config"
	"go.temporal.io/server/common/log/tag"
	"go.temporal.io/server/common/metrics"
	"go.temporal.io/server/common/primitives/timestamp"
)
const (
	errEncodeVisibilityRecord = "failed to encode visibility record"
	indexKeyStartTimeout      = "startTimeout"
	indexKeyCloseTimeout      = "closeTimeout"
	timeoutInSeconds          = 5
)
var (
	errRetryable = errors.New("retryable error")
)
type (
	visibilityArchiver struct {
		container     *archiver.VisibilityBootstrapContainer
		gcloudStorage connector.Client
		queryParser   QueryParser
	}
	queryVisibilityToken struct {
		Offset int
	}
	queryVisibilityRequest struct {
		namespaceID   string
		pageSize      int
		nextPageToken []byte
		parsedQuery   *parsedQuery
	}
)
func newVisibilityArchiver(container *archiver.VisibilityBootstrapContainer, storage connector.Client) *visibilityArchiver {
	return &visibilityArchiver{
		container:     container,
		gcloudStorage: storage,
		queryParser:   NewQueryParser(),
	}
}