-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from hashicorp/f-fingerprint-config
Pass agent configuration into fingerprinter
- Loading branch information
Showing
10 changed files
with
72 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package config | ||
|
||
import ( | ||
"io" | ||
|
||
"github.com/hashicorp/nomad/nomad/structs" | ||
) | ||
|
||
// RPCHandler can be provided to the Client if there is a local server | ||
// to avoid going over the network. If not provided, the Client will | ||
// maintain a connection pool to the servers | ||
type RPCHandler interface { | ||
RPC(method string, args interface{}, reply interface{}) error | ||
} | ||
|
||
// Config is used to parameterize and configure the behavior of the client | ||
type Config struct { | ||
// DevMode controls if we are in a development mode which | ||
// avoids persistent storage. | ||
DevMode bool | ||
|
||
// StateDir is where we store our state | ||
StateDir string | ||
|
||
// AllocDir is where we store data for allocations | ||
AllocDir string | ||
|
||
// LogOutput is the destination for logs | ||
LogOutput io.Writer | ||
|
||
// Region is the clients region | ||
Region string | ||
|
||
// Servers is a list of known server addresses. These are as "host:port" | ||
Servers []string | ||
|
||
// RPCHandler can be provided to avoid network traffic if the | ||
// server is running locally. | ||
RPCHandler RPCHandler | ||
|
||
// Node provides the base node | ||
Node *structs.Node | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters