session

package
v0.0.0-...-f4d6c7b Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2019 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServiceDescriptor

type ServiceDescriptor struct {
	// Name of the service.
	Name string
	// Provider name.
	Provider string
}

ServiceDescriptor describe a mixnet Provider-side service.

func FindServices

func FindServices(capability string, doc *pki.Document) []ServiceDescriptor

FindServices is a helper function for finding Provider-side services in the PKI document.

type Session

type Session struct {
	worker.Worker
	// contains filtered or unexported fields
}

Session is the struct type that keeps state for a given session.

func New

func New(ctx context.Context, fatalErrCh chan error, logBackend *log.Backend, cfg *config.Config) (*Session, error)

New establishes a session with provider using key. This method will block until session is connected to the Provider.

func (*Session) GetService

func (s *Session) GetService(serviceName string) (*ServiceDescriptor, error)

GetService returns a randomly selected service matching the specified service name

Jump to

Keyboard shortcuts

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