Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ParseID = secrets.ParseID MustParseID = secrets.MustParseID ParsePattern = secrets.ParsePattern MustParsePattern = secrets.MustParsePattern NewVersion = version.NewVersion MustNewVersion = version.MustNewVersion ErrSecretNotFound = secrets.ErrNotFound )
var ErrNotFound = secrets.ErrNotFound
Functions ¶
This section is empty.
Types ¶
type AccessControl ¶ added in v0.2.0
type AccessControl = accesscontrol.AccessControl
type AccessControlConfig ¶ added in v0.2.0
type AccessControlConfig struct{}
type AccessControlModule ¶ added in v0.2.0
type AccessControlModule interface {
AccessControl
}
type Config ¶
type Config struct {
// Version of the plugin in semver format.
Version Version
// Logger to be used within plugin side SDK code. If nil, the SDK logs nothing.
Logger Logger
*SecretsProviderConfig
*AccessControlConfig
}
type Envelope ¶ added in v0.0.8
Envelope is a type alias for secrets.Envelope, representing a secret envelope.
type ManualLaunchOption ¶
type ManualLaunchOption func(c *cfg) error
ManualLaunchOption to apply to a plugin during its creation when it's manually launched (not by the secrets runtime).
func WithConnection ¶
func WithConnection(conn net.Conn) ManualLaunchOption
WithConnection sets an existing secrets runtime connection to use.
func WithPluginName ¶
func WithPluginName(name string) ManualLaunchOption
WithPluginName sets the name to use in plugin registration.
func WithRegistrationTimeout ¶
func WithRegistrationTimeout(timeout time.Duration) ManualLaunchOption
WithRegistrationTimeout sets custom registration timeout.
type Pattern ¶ added in v0.0.8
Pattern is a type alias for secrets.Pattern, used to match secret IDs.
type Resolver ¶ added in v0.0.8
Resolver is a type alias for resolver.Resolver, used to resolve secrets.
type SecretsProvider ¶ added in v0.2.0
type SecretsProvider interface {
Resolver
}
type SecretsProviderConfig ¶ added in v0.2.0
type SecretsProviderConfig struct {
// Pattern to control which IDs should match this plugin. Set to `**` to match any ID.
Pattern Pattern
}
type Stub ¶
type Stub interface {
// Run starts the plugin then waits for the plugin service to exit, either due to a
// critical error or by cancelling the context. Calling Run() while the plugin is running,
// will result in an error. After the plugin service exits, Run() can safely be called again.
Run(context.Context) error
// RegistrationTimeout returns the registration timeout for the stub.
// This is the default timeout if the plugin has not been started or
// the timeout received in the Configure request otherwise.
RegistrationTimeout() time.Duration
// RequestTimeout returns the request timeout for the stub.
// This is the default timeout if the plugin has not been started or
// the timeout received in the Configure request otherwise.
RequestTimeout() time.Duration
}
Stub is the interface the stub provides for the plugin implementation.
func NewAccessControlModule ¶ added in v0.2.0
func NewAccessControlModule(p AccessControlModule, config Config, opts ...ManualLaunchOption) (Stub, error)
func NewSecretsProvider ¶ added in v0.2.0
func NewSecretsProvider(p SecretsProvider, config Config, opts ...ManualLaunchOption) (Stub, error)
NewSecretsProvider creates a stub with the given plugin and options. ManualLaunchOption only apply when the plugin is launched manually. If launched by the secrets runtime, they are ignored. If logger is nil, the SDK logs nothing.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
protoc-gen-go-rpc
command
Command protoc-gen-go-rpc generates the clients and handlers of the services in a proto file.
|
Command protoc-gen-go-rpc generates the clients and handlers of the services in a proto file. |
|
Package rpc implements unary calls in the Connect protocol on net/http: https://connectrpc.com/docs/protocol
|
Package rpc implements unary calls in the Connect protocol on net/http: https://connectrpc.com/docs/protocol |