admin

package
v0.359.1 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ShouldUseLocalClient added in v0.296.1

func ShouldUseLocalClient(ctx context.Context, adminClient ftlv1connect.AdminServiceClient, endpoint *url.URL) (bool, error)

ShouldUseLocalClient returns whether a local admin client should be used based on the admin service client and the endpoint.

If the controller is not present AND endpoint is local, then a local client should be used so that the user does not need to spin up a controller just to run the `ftl config/secret` commands.

If true is returned, use NewLocalClient() to create a local client after setting up config and secret managers for the context.

Types

type AdminService

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

func NewAdminService

func NewAdminService(cm *cf.Manager[cf.Configuration], sm *cf.Manager[cf.Secrets], schr SchemaRetriever) *AdminService

func (*AdminService) ConfigGet

ConfigGet returns the configuration value for a given ref string.

func (*AdminService) ConfigList

ConfigList returns the list of configuration values, optionally filtered by module.

func (*AdminService) ConfigSet

ConfigSet sets the configuration at the given ref to the provided value.

func (*AdminService) ConfigUnset

ConfigUnset unsets the config value at the given ref.

func (*AdminService) Ping

func (*AdminService) SecretGet

SecretGet returns the secret value for a given ref string.

func (*AdminService) SecretSet

SecretSet sets the secret at the given ref to the provided value.

func (*AdminService) SecretUnset

SecretUnset unsets the secret value at the given ref.

func (*AdminService) SecretsList

SecretsList returns the list of secrets, optionally filtered by module.

type Client added in v0.246.0

Client standardizes an common interface between the AdminService as accessed via gRPC and a purely-local variant that doesn't require a running controller to access.

func NewLocalClient added in v0.296.1

func NewLocalClient(cm *cf.Manager[cf.Configuration], sm *cf.Manager[cf.Secrets]) Client

NewLocalClient creates a admin client that reads and writes from the provided config and secret managers

type SchemaRetriever added in v0.276.3

type SchemaRetriever interface {
	GetActiveSchema(ctx context.Context) (*schema.Schema, error)
}

Jump to

Keyboard shortcuts

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