binder

package
v0.0.0-...-d121363 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const CredentialsExtension = ".json"
View Source
const CredentialsSubdir = "creds"
View Source
const MountSubdir = "mount"
View Source
const PollSleepTime = 100 * time.Millisecond
View Source
const SocketFilename = "socket"

Variables

This section is empty.

Functions

func NewWatcher

func NewWatcher(path string) watcher

Types

type Binder

type Binder interface {

	// Returns the gRPC server for this Binder. Used to register the service to be provided to workloads.
	Server() *grpc.Server

	// The path this Binder is searching for workload mounts on.
	SearchPath() string

	// Search for pod mounts to bind sockets in.
	// Send a wait group over the stop channel to gracefully cancel.  The receiver
	// should call Done() on the wait group when its shutdown is complete.
	SearchAndBind(stop <-chan *sync.WaitGroup)
}

func NewBinder

func NewBinder(searchPath string) Binder

type Credentials

type Credentials struct {
	Uid            string
	Workload       string
	Namespace      string
	ServiceAccount string
}

TODO relocate to shared location

func CallerFromAuthInfo

func CallerFromAuthInfo(ainfo credentials.AuthInfo) (Credentials, bool)

func CallerFromContext

func CallerFromContext(ctx context.Context) (Credentials, bool)

func (Credentials) AuthType

func (c Credentials) AuthType() string

type Operation

type Operation int
const (
	Added Operation = iota
	Removed
)

Jump to

Keyboard shortcuts

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