localdb

package
v0.0.0-...-adc8916 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2024 License: AGPL-3.0, Apache-2.0, CC-BY-SA-3.0 Imports: 54 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OIDCAccessTokenAuthorizer

func OIDCAccessTokenAuthorizer(cluster *arvados.Cluster, getdb func(context.Context) (*sqlx.DB, error)) *oidcTokenAuthorizer

Types

type Conn

type Conn struct {
	// contains filtered or unexported fields
}

func NewConn

func NewConn(bgCtx context.Context, cluster *arvados.Cluster, getdb func(context.Context) (*sqlx.DB, error)) *Conn

func (*Conn) AuthorizedKeyCreate

func (conn *Conn) AuthorizedKeyCreate(ctx context.Context, opts arvados.CreateOptions) (arvados.AuthorizedKey, error)

AuthorizedKeyCreate checks that the provided public key is valid, then proxies to railsproxy.

func (*Conn) AuthorizedKeyUpdate

func (conn *Conn) AuthorizedKeyUpdate(ctx context.Context, opts arvados.UpdateOptions) (arvados.AuthorizedKey, error)

AuthorizedKeyUpdate checks that the provided public key is valid, then proxies to railsproxy.

func (*Conn) CollectionCreate

func (conn *Conn) CollectionCreate(ctx context.Context, opts arvados.CreateOptions) (arvados.Collection, error)

CollectionCreate defers to railsProxy for everything except blob signatures and vocabulary checking.

func (*Conn) CollectionGet

func (conn *Conn) CollectionGet(ctx context.Context, opts arvados.GetOptions) (arvados.Collection, error)

CollectionGet defers to railsProxy for everything except blob signatures.

func (*Conn) CollectionList

func (conn *Conn) CollectionList(ctx context.Context, opts arvados.ListOptions) (arvados.CollectionList, error)

CollectionList defers to railsProxy for everything except blob signatures.

func (*Conn) CollectionUpdate

func (conn *Conn) CollectionUpdate(ctx context.Context, opts arvados.UpdateOptions) (arvados.Collection, error)

CollectionUpdate defers to railsProxy for everything except blob signatures and vocabulary checking.

func (*Conn) ContainerGatewayTunnel

func (conn *Conn) ContainerGatewayTunnel(ctx context.Context, opts arvados.ContainerGatewayTunnelOptions) (resp arvados.ConnectionResponse, err error)

ContainerGatewayTunnel sets up a tunnel enabling us (controller) to connect to the caller's (crunch-run's) gateway server.

func (*Conn) ContainerRequestContainerStatus

func (conn *Conn) ContainerRequestContainerStatus(ctx context.Context, opts arvados.GetOptions) (arvados.ContainerStatus, error)

func (*Conn) ContainerRequestCreate

func (conn *Conn) ContainerRequestCreate(ctx context.Context, opts arvados.CreateOptions) (arvados.ContainerRequest, error)

ContainerRequestCreate defers to railsProxy for everything except vocabulary checking.

func (*Conn) ContainerRequestDelete

func (conn *Conn) ContainerRequestDelete(ctx context.Context, opts arvados.DeleteOptions) (arvados.ContainerRequest, error)

func (*Conn) ContainerRequestGet

func (conn *Conn) ContainerRequestGet(ctx context.Context, opts arvados.GetOptions) (arvados.ContainerRequest, error)

func (*Conn) ContainerRequestList

func (conn *Conn) ContainerRequestList(ctx context.Context, opts arvados.ListOptions) (arvados.ContainerRequestList, error)

func (*Conn) ContainerRequestLog

func (conn *Conn) ContainerRequestLog(ctx context.Context, opts arvados.ContainerLogOptions) (http.Handler, error)

ContainerRequestLog returns a WebDAV handler that reads logs from the indicated container request. It works by proxying the incoming HTTP request to

  • the container gateway, if there is an associated container that is running

  • a different controller process, if there is a running container whose gateway is accessible through a tunnel to a different controller process

  • keep-web, if saved logs exist and there is no gateway (or the associated container is finished)

  • an empty-collection stub, if there is no gateway and no saved log

For an incoming request

GET /arvados/v1/container_requests/{cr_uuid}/log/{c_uuid}{/c_log_path}

The upstream request may be to {c_uuid}'s container gateway

GET /arvados/v1/container_requests/{cr_uuid}/log/{c_uuid}{/c_log_path}
X-Webdav-Prefix: /arvados/v1/container_requests/{cr_uuid}/log/{c_uuid}
X-Webdav-Source: /log

...or the upstream request may be to keep-web (where {cr_log_uuid} is the container request log collection UUID)

GET /arvados/v1/container_requests/{cr_uuid}/log/{c_uuid}{/c_log_path}
Host: {cr_log_uuid}.internal
X-Webdav-Prefix: /arvados/v1/container_requests/{cr_uuid}/log
X-Arvados-Container-Uuid: {c_uuid}

...or the request may be handled locally using an empty-collection stub.

func (*Conn) ContainerRequestUpdate

func (conn *Conn) ContainerRequestUpdate(ctx context.Context, opts arvados.UpdateOptions) (arvados.ContainerRequest, error)

ContainerRequestUpdate defers to railsProxy for everything except vocabulary checking.

func (*Conn) ContainerSSH

func (conn *Conn) ContainerSSH(ctx context.Context, opts arvados.ContainerSSHOptions) (sshconn arvados.ConnectionResponse, err error)

ContainerSSH returns a connection to the SSH server in the appropriate crunch-run process on the worker node where the specified container is running.

If the returned error is nil, the caller is responsible for closing sshconn.Conn.

func (*Conn) ContainerUpdate

func (conn *Conn) ContainerUpdate(ctx context.Context, opts arvados.UpdateOptions) (arvados.Container, error)

ContainerUpdate defers to railsProxy and then notifies the container priority updater thread.

func (*Conn) CreateAPIClientAuthorization

func (conn *Conn) CreateAPIClientAuthorization(ctx context.Context, rootToken string, authinfo rpc.UserSessionAuthInfo) (resp arvados.APIClientAuthorization, err error)

func (*Conn) GroupContents

func (conn *Conn) GroupContents(ctx context.Context, options arvados.GroupContentsOptions) (arvados.ObjectList, error)

func (*Conn) GroupCreate

func (conn *Conn) GroupCreate(ctx context.Context, opts arvados.CreateOptions) (arvados.Group, error)

GroupCreate defers to railsProxy for everything except vocabulary checking.

func (*Conn) GroupDelete

func (conn *Conn) GroupDelete(ctx context.Context, opts arvados.DeleteOptions) (arvados.Group, error)

func (*Conn) GroupGet

func (conn *Conn) GroupGet(ctx context.Context, opts arvados.GetOptions) (arvados.Group, error)

func (*Conn) GroupList

func (conn *Conn) GroupList(ctx context.Context, opts arvados.ListOptions) (arvados.GroupList, error)

func (*Conn) GroupUpdate

func (conn *Conn) GroupUpdate(ctx context.Context, opts arvados.UpdateOptions) (arvados.Group, error)

GroupUpdate defers to railsProxy for everything except vocabulary checking.

func (*Conn) LastVocabularyError

func (conn *Conn) LastVocabularyError() error

LastVocabularyError returns the last error encountered while loading the vocabulary file. Implements health.Func

func (*Conn) LinkCreate

func (conn *Conn) LinkCreate(ctx context.Context, opts arvados.CreateOptions) (arvados.Link, error)

LinkCreate defers to railsProxy for everything except vocabulary checking.

func (*Conn) LinkUpdate

func (conn *Conn) LinkUpdate(ctx context.Context, opts arvados.UpdateOptions) (arvados.Link, error)

LinkUpdate defers to railsProxy for everything except vocabulary checking.

func (*Conn) Login

func (conn *Conn) Login(ctx context.Context, opts arvados.LoginOptions) (arvados.LoginResponse, error)

Login handles the login of conn giving to the appropriate loginController

func (*Conn) Logout

func (conn *Conn) Logout(ctx context.Context, opts arvados.LogoutOptions) (arvados.LogoutResponse, error)

Logout handles the logout of conn giving to the appropriate loginController

func (*Conn) UserAuthenticate

UserAuthenticate handles the User Authentication of conn giving to the appropriate loginController

func (*Conn) VocabularyGet

func (conn *Conn) VocabularyGet(ctx context.Context) (arvados.Vocabulary, error)

VocabularyGet refreshes the vocabulary cache if necessary and returns it.

Jump to

Keyboard shortcuts

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