sink

package
v1.1.11 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SConfig

type SConfig struct {
	Sink
	Logger  hclog.Logger
	Config  map[string]interface{}
	Client  *api.Client
	WrapTTL time.Duration
	DHType  string
	DHPath  string
	AAD     string
	// contains filtered or unexported fields
}

type SReader

type SReader interface {
	Token() string
}

type SServer

type SServer struct {
	DoneCh chan struct{}
	// contains filtered or unexported fields
}

SinkServer is responsible for pushing tokens to sinks

func NewSinkServer

func NewSinkServer(conf *SServerConfig) *SServer

func (*SServer) Run

func (ss *SServer) Run(ctx context.Context, incoming chan string, sinks []*SConfig)

Run executes the server's run loop, which is responsible for reading in new tokens and pushing them out to the various sinks.

type SServerConfig

type SServerConfig struct {
	Logger        hclog.Logger
	Client        *api.Client
	Context       context.Context
	ExitAfterAuth bool
}

type Sink

type Sink interface {
	WriteToken(string) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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