agent

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2022 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	Cfg      *config.Config
	Ver, Exe string
	// contains filtered or unexported fields
}

Agent structure wraps running gpg-agent process.

func NewAgent

func NewAgent(cfg *config.Config) (*Agent, error)

NewAgent initializes Agent structure.

func (*Agent) Close

func (a *Agent) Close(ct ConnectorType)

Close stops serving requests for a particular ConnectorType.

func (*Agent) GetConnector added in v1.2.0

func (a *Agent) GetConnector(ct ConnectorType) *Connector

GetConnector returns pointer to requested connector or nil.

func (*Agent) Serve

func (a *Agent) Serve(ct ConnectorType) error

Serve handles serving requests for a particular ConnectorType.

func (*Agent) SessionLock

func (a *Agent) SessionLock()

SessionLock sets flag to indicate that user session is presently locked.

func (*Agent) SessionUnlock

func (a *Agent) SessionUnlock()

SessionUnlock sets flag to indicate that user session is presently unlocked.

func (*Agent) Start

func (a *Agent) Start() error

Start executes gpg-agent using configuration values.

func (*Agent) Status

func (a *Agent) Status() string

Status returns string with currently running agent configuration.

func (*Agent) Stop

func (a *Agent) Stop() error

Stop stops all connectors and gpg-agent cleanly.

type Connector

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

Connector keeps parameters to be able to serve particular ConnectorType.

func NewConnector

func NewConnector(index ConnectorType, pathGPG, pathGUI, name string, locked *int32, wg *sync.WaitGroup) *Connector

NewConnector initializes Connector of particular ConnectorType.

func (*Connector) Close

func (c *Connector) Close()

Close stops serving on Connector.

func (*Connector) Name

func (c *Connector) Name() string

Name returns name part of socket/pipe being served.

func (*Connector) PathGPG

func (c *Connector) PathGPG() string

PathGPG returns path to gpg socket being served.

func (*Connector) PathGUI

func (c *Connector) PathGUI() string

PathGUI returns path to unix socket being served.

func (*Connector) Port added in v1.5.0

func (c *Connector) Port() int

Port returns TCP local port of our listener or negative value.

func (*Connector) Serve

func (c *Connector) Serve(deadline time.Duration) error

Serve serves requests on Connector.

type ConnectorType

type ConnectorType int

ConnectorType to define what we support.

const (
	ConnectorSockAgent ConnectorType = iota
	ConnectorSockAgentExtra
	ConnectorSockAgentBrowser
	ConnectorSockAgentSSH
	ConnectorPipeSSH
	ConnectorSockAgentCygwinSSH
	ConnectorExtraPort
	ConnectorXShell
)

All possible Connector Types.

func (ConnectorType) String

func (ct ConnectorType) String() string

Jump to

Keyboard shortcuts

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