-
Notifications
You must be signed in to change notification settings - Fork 487
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Paschalis Tsilias <[email protected]>
- Loading branch information
1 parent
c5ff4d4
commit 91c2ff8
Showing
2 changed files
with
46 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package remotecfg | ||
|
||
import ( | ||
"context" | ||
"errors" | ||
|
||
"connectrpc.com/connect" | ||
agentv1 "github.com/grafana/agent-remote-config/api/gen/proto/go/agent/v1" | ||
) | ||
|
||
type noopClient struct{} | ||
|
||
// GetConfig returns the agent's configuration. | ||
func (c noopClient) GetConfig(context.Context, *connect.Request[agentv1.GetConfigRequest]) (*connect.Response[agentv1.GetConfigResponse], error) { | ||
return nil, errors.New("noop client") | ||
} | ||
|
||
// GetAgent returns information about the agent. | ||
func (c noopClient) GetAgent(context.Context, *connect.Request[agentv1.GetAgentRequest]) (*connect.Response[agentv1.Agent], error) { | ||
return nil, errors.New("noop client") | ||
} | ||
|
||
// ListAgents returns information about all agents. | ||
func (c noopClient) ListAgents(context.Context, *connect.Request[agentv1.ListAgentsRequest]) (*connect.Response[agentv1.Agents], error) { | ||
return nil, errors.New("noop client") | ||
} | ||
|
||
// CreateAgent registers a new agent. | ||
func (c noopClient) CreateAgent(context.Context, *connect.Request[agentv1.CreateAgentRequest]) (*connect.Response[agentv1.Agent], error) { | ||
return nil, errors.New("noop client") | ||
} | ||
|
||
// UpdateAgent updates an existing agent. | ||
func (c noopClient) UpdateAgent(context.Context, *connect.Request[agentv1.UpdateAgentRequest]) (*connect.Response[agentv1.Agent], error) { | ||
return nil, errors.New("noop client") | ||
} | ||
|
||
// DeleteAgent deletes an existing agent. | ||
func (c noopClient) DeleteAgent(context.Context, *connect.Request[agentv1.DeleteAgentRequest]) (*connect.Response[agentv1.DeleteAgentResponse], error) { | ||
return nil, errors.New("noop client") | ||
} |
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