fuse

package
v1.35.1 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 18 Imported by: 2

Documentation

Overview

Package fuse provides a connection source wherein the user does not need to specify which instance they are connecting to before they start the executable. Instead, simply attempting to access a file in the provided directory will transparently create a proxied connection to an instance which has that name.

Specifically, given that NewConnSrc was called with the mounting directory as /cloudsql:

  1. Execute `mysql -S /cloudsql/speckle:instance`
  2. The 'mysql' executable looks up the file "speckle:instance" inside "/cloudsql"
  3. This lookup is intercepted by the code in this package. A local unix socket located in a temporary directory is opened for listening and the lookup for "speckle:instance" returns to mysql saying that it is a symbolic link pointing to this new local socket.
  4. mysql dials the local unix socket, creating a new connection to the specified instance.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConnSrc

func NewConnSrc(mountdir, tmpdir string, client *proxy.Client, connset *proxy.ConnSet) (<-chan proxy.Conn, io.Closer, error)

NewConnSrc returns a source of new connections based on Lookups in the provided mount directory. If there isn't a directory located at tmpdir one is created. The second return parameter can be used to shutdown and release any resources. As a result of this shutdown, or during any other fatal error, the returned chan will be closed.

The connset parameter is optional.

func Supported

func Supported() bool

Supported returns true if the current system supports FUSE.

Types

This section is empty.

Jump to

Keyboard shortcuts

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