agent

package
v0.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const MaxAuthMessageLength = 1024 * 1024

Variables

This section is empty.

Functions

func RunAgentClient

func RunAgentClient(conf *config.AgentCmd) error

Types

type Attributes

type Attributes struct {
	AgentID string
	Role    string
}

type Authenticator

type Authenticator interface {
	Authenticate(ctx context.Context, conn quic.Connection) error
}

func NewJWTAuthenticator

func NewJWTAuthenticator(token string) (Authenticator, error)

func NewNoAuthAuthenticator

func NewNoAuthAuthenticator(agentID string) (Authenticator, error)

type JWTAuthenticator

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

func (*JWTAuthenticator) Authenticate

func (r *JWTAuthenticator) Authenticate(ctx context.Context, conn quic.Connection) error

type JWTVerifier

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

func (*JWTVerifier) Verify

func (r *JWTVerifier) Verify(ctx context.Context, conn quic.Connection) (*Attributes, error)

type NoAuthAuthenticator

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

func (*NoAuthAuthenticator) Authenticate

func (r *NoAuthAuthenticator) Authenticate(ctx context.Context, conn quic.Connection) error

type NoAuthVerifier

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

func (*NoAuthVerifier) Verify

func (r *NoAuthVerifier) Verify(ctx context.Context, conn quic.Connection) (*Attributes, error)

type QuickClient

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

func NewQuickClient

func NewQuickClient(parent context.Context, address string, authenticator Authenticator, logger *logger.Logger, whitelist []string, tlsClientConfig config.TLSClientConfig) (*QuickClient, error)

type Verifier

type Verifier interface {
	Verify(ctx context.Context, conn quic.Connection) (*Attributes, error)
}

func NewJWTVerifier

func NewJWTVerifier(tokenVerifier jwtutil.TokenVerifier) Verifier

func NewNoAuthVerifier

func NewNoAuthVerifier() Verifier

Jump to

Keyboard shortcuts

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