Documentation
¶
Overview ¶
Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at
http://aws.amazon.com/apache2.0/
or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func GetMetadataIdentity(agentIdentity identity.IAgentIdentityInner) (identity.IMetadataIdentity, bool)
- func GetRemoteProvider(agentIdentity identity.IAgentIdentity) (credentialproviders.IRemoteProvider, bool)
- func IsEC2Instance(agentIdentity identity.IAgentIdentity) bool
- func IsOnPremInstance(agentIdentity identity.IAgentIdentity) bool
- func NewAgentIdentity(log log.T, config *appconfig.SsmagentConfig, selector IAgentIdentitySelector) (identity identity.IAgentIdentity, err error)
- type CreateIdentityFunc
- type IAgentIdentitySelector
Constants ¶
const (
// 64 is the max length of docker container ids
MaxInstanceIDLen = 64
)
Variables ¶
This section is empty.
Functions ¶
func GetMetadataIdentity ¶
func GetMetadataIdentity(agentIdentity identity.IAgentIdentityInner) (identity.IMetadataIdentity, bool)
GetMetadataIdentity returns the metadata interface if the identity supports it
func GetRemoteProvider ¶
func GetRemoteProvider(agentIdentity identity.IAgentIdentity) (credentialproviders.IRemoteProvider, bool)
GetRemoteProvider returns the credentials refresher interface if the identity supports it
func IsEC2Instance ¶
func IsEC2Instance(agentIdentity identity.IAgentIdentity) bool
IsEC2Instance return true if the agent identity is ec2
func IsOnPremInstance ¶
func IsOnPremInstance(agentIdentity identity.IAgentIdentity) bool
IsOnPremInstance returns true if the agent identity is onprem
func NewAgentIdentity ¶
func NewAgentIdentity(log log.T, config *appconfig.SsmagentConfig, selector IAgentIdentitySelector) (identity identity.IAgentIdentity, err error)
Types ¶
type CreateIdentityFunc ¶
type CreateIdentityFunc func(log.T, *appconfig.SsmagentConfig) []identityinterface.IAgentIdentityInner
type IAgentIdentitySelector ¶
type IAgentIdentitySelector interface {
SelectAgentIdentity([]identity.IAgentIdentityInner, string) identity.IAgentIdentityInner
}
IAgentIdentitySelector abstracts logic to select an agent identity
func NewDefaultAgentIdentitySelector ¶
func NewDefaultAgentIdentitySelector(log log.T) IAgentIdentitySelector
NewDefaultAgentIdentitySelector creates a instance of a default agent identity selector
func NewInstanceIDRegionAgentIdentitySelector ¶
func NewInstanceIDRegionAgentIdentitySelector(log log.T, instanceID, region string) IAgentIdentitySelector
NewInstanceIDRegionAgentIdentitySelector creates a instance of a default agent identity selector
func NewRuntimeConfigIdentitySelector ¶
func NewRuntimeConfigIdentitySelector(log log.T) IAgentIdentitySelector