tbot

package
v11.3.3 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bot

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

func New

func New(cfg *config.BotConfig, log logrus.FieldLogger, reloadChan chan struct{}) *Bot

func (*Bot) AuthPing

func (b *Bot) AuthPing(ctx context.Context) (*proto.PingResponse, error)

AuthPing pings the auth server and returns the (possibly cached) response.

func (*Bot) AuthenticatedUserClientFromIdentity

func (b *Bot) AuthenticatedUserClientFromIdentity(ctx context.Context, id *identity.Identity) (auth.ClientI, error)

AuthenticatedUserClientFromIdentity creates a new auth client from the given identity. Note that depending on the connection address given, this may attempt to connect via the proxy and therefore requires both SSH and TLS credentials.

func (*Bot) Client

func (b *Bot) Client() auth.ClientI

Client retrieves the current auth client.

func (*Bot) Config

func (b *Bot) Config() *config.BotConfig

Config returns the current bot config

func (*Bot) GetCertAuthorities

func (b *Bot) GetCertAuthorities(ctx context.Context, caType types.CertAuthType) ([]types.CertAuthority, error)

GetCertAuthorities returns the possibly cached CAs of the given type and requests them from the server if unavailable.

func (*Bot) ProxyPing

func (b *Bot) ProxyPing(ctx context.Context) (*webclient.PingResponse, error)

ProxyPing returns a (possibly cached) ping response from the Teleport proxy. Note that it relies on the auth server being configured with a sane proxy public address.

func (*Bot) Run

func (b *Bot) Run(ctx context.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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