Documentation
¶
Index ¶
- func LoadBuiltins(syncReq chan struct{}) chan types.PluginUpdateResponse
- type Agent
- func (a *Agent) AgentPlugins(ctx context.Context) (map[string]string, error)
- func (a *Agent) Close() error
- func (a *Agent) Connect(ctx context.Context) error
- func (a *Agent) Handshake(ctx context.Context) error
- func (a *Agent) KeepPluginsUpToDate(ctxMetadata context.Context, specsSync chan struct{})
- func (a *Agent) KillPlugins()
- func (a *Agent) ListenTaskRequest(ctx context.Context) error
- type Config
- type ID
- type SpecsManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadBuiltins ¶
func LoadBuiltins(syncReq chan struct{}) chan types.PluginUpdateResponse
Types ¶
type Agent ¶
type Agent struct {
SpecManager *SpecsManager
// contains filtered or unexported fields
}
func New ¶
New returns a new Client and an initialized context containing values like agent_id.
While the agent is the client from GRPC perspective, it is the server from application perspective, i.e. the manager (GRPC server) send request to the agent (GRPC client) via a bidi GRPC stream.
func (*Agent) AgentPlugins ¶
func (*Agent) KeepPluginsUpToDate ¶
func (*Agent) KillPlugins ¶
func (a *Agent) KillPlugins()
type Config ¶
type Config struct {
ManagerAddress string
ManagerPort string
AgentID string
MTLSEnabled bool
MTLSCert string
MTLSKey string
MTLSManagerCA string
PluginDir string
PluginServerPort string
CustomResolvers []string
MaxConcurrentTasks int
MaxWaitingRequests int
}
Config holds the configuration for creating a new Agent.
type SpecsManager ¶
type SpecsManager struct {
// contains filtered or unexported fields
}
func NewSpecsManager ¶
func NewSpecsManager() (*SpecsManager, error)
func (*SpecsManager) List ¶
func (s *SpecsManager) List() ([]string, error)
func (*SpecsManager) StartSpecCollector ¶
func (s *SpecsManager) StartSpecCollector(ctx context.Context, syncReq chan struct{})
Click to show internal directories.
Click to hide internal directories.