luci: go.chromium.org/luci/logdog/server/archivist Index | Files

package archivist

import "go.chromium.org/luci/logdog/server/archivist"

Index

Package Files

archivist.go storageSource.go

type Archivist Uses

type Archivist struct {
    // Service is the client to use to communicate with Coordinator's Services
    // endpoint.
    Service logdog.ServicesClient

    // SettingsLoader loads archival settings for a specific project.
    SettingsLoader SettingsLoader

    // Storage is the archival source Storage instance.
    Storage storage.Storage

    // GSClientFactory obtains a Google Storage client for archive generation.
    GSClientFactory func(context.Context, types.ProjectName) (gs.Client, error)
}

Archivist is a stateless configuration capable of archiving individual log streams.

func (*Archivist) ArchiveTask Uses

func (a *Archivist) ArchiveTask(c context.Context, task *logdog.ArchiveTask) error

ArchiveTask processes and executes a single log stream archive task.

If the supplied Context is Done, operation may terminate before completion, returning the Context's error.

type Settings Uses

type Settings struct {
    // GSBase is the base Google Storage path. This includes the bucket name
    // and any associated path.
    //
    // This must be unique to this archival project. In practice, it will be
    // composed of the project's archival bucket and project ID.
    GSBase gs.Path
    // GSStagingBase is the base Google Storage path for archive staging. This
    // includes the bucket name and any associated path.
    //
    // This must be unique to this archival project. In practice, it will be
    // composed of the project's staging archival bucket and project ID.
    GSStagingBase gs.Path

    // AlwaysRender, if true, means that a binary should be archived
    // regardless of whether a specific binary file extension has been supplied
    // with the log stream.
    AlwaysRender bool

    // IndexStreamRange is the maximum number of stream indexes in between index
    // entries. See archive.Manifest for more information.
    IndexStreamRange int
    // IndexPrefixRange is the maximum number of prefix indexes in between index
    // entries. See archive.Manifest for more information.
    IndexPrefixRange int
    // IndexByteRange is the maximum number of stream data bytes in between index
    // entries. See archive.Manifest for more information.
    IndexByteRange int
}

Settings defines the archival parameters for a specific archival operation.

In practice, this will be formed from service and project settings.

type SettingsLoader Uses

type SettingsLoader func(context.Context, types.ProjectName) (*Settings, error)

SettingsLoader returns archival Settings for a given project.

Package archivist imports 19 packages (graph). Updated 2019-06-16. Refresh now. Tools for package owners.