sds

package
v1.10.62 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AthenzGrpcServerName

func AthenzGrpcServerName() string

func ClientAuthType

func ClientAuthType() string

func NewCredentials

func NewCredentials() credentials.TransportCredentials

func StartGrpcServer

func StartGrpcServer(opts *options.Options, certUpdates chan bool) error

func StartUdsListener

func StartUdsListener(udsPath string) (net.Listener, error)

StartUdsListener Start a Unix-Domain-Socket listener. We're going to create a simple wrapper struct for the Listener object since we want to intercept Accept calls and extract the caller's user and process ids. The client info object will then be passed to grpc as credentials.AuthInfo which can be accessed later from the stream context

Types

type ClientInfo

type ClientInfo struct {
	UserID int
	PID    int
}

func ClientInfoFromContext

func ClientInfoFromContext(ctx context.Context) ClientInfo

func (ClientInfo) AuthType

func (ClientInfo) AuthType() string

type Listener

type Listener struct {
	net.Listener
}

func (*Listener) Accept

func (listener *Listener) Accept() (net.Conn, error)

func (*Listener) Addr

func (listener *Listener) Addr() net.Addr

func (*Listener) Close

func (listener *Listener) Close() error

type ServerHandler

type ServerHandler struct {
	Mutex       sync.RWMutex
	Options     *options.Options
	Subscribers map[string]*Subscriber
}

func NewServerHandler

func NewServerHandler(opts *options.Options) *ServerHandler

func (*ServerHandler) DeltaSecrets

func (*ServerHandler) FetchSecrets

func (*ServerHandler) NotifySubscribers

func (handler *ServerHandler) NotifySubscribers()

func (*ServerHandler) StreamSecrets

type Subscriber

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

func NewSubscriber

func NewSubscriber() *Subscriber

func (*Subscriber) Close

func (subscriber *Subscriber) Close()

func (*Subscriber) GetCertUpdates

func (subscriber *Subscriber) GetCertUpdates() chan bool

func (*Subscriber) GetId

func (subscriber *Subscriber) GetId() string

func (*Subscriber) GetVersionInfo

func (subscriber *Subscriber) GetVersionInfo() string

func (*Subscriber) IncrementVersion

func (subscriber *Subscriber) IncrementVersion()

func (*Subscriber) Notify

func (subscriber *Subscriber) Notify()

func (*Subscriber) SetResponseNonce

func (subscriber *Subscriber) SetResponseNonce(nonce string)

func (*Subscriber) ValidateResponseNonce

func (subscriber *Subscriber) ValidateResponseNonce(responseNonce string) bool

func (*Subscriber) ValidateVersionInfo

func (subscriber *Subscriber) ValidateVersionInfo(versionInfo string) bool

type UdsConn

type UdsConn struct {
	net.Conn
	ClientInfo ClientInfo
}

Jump to

Keyboard shortcuts

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