agent

package
v1.9.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 28 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterService

func RegisterService(s grpc.ServiceRegistrar, service *Service)

RegisterService registers the agent service on the gRPC server/

Types

type Config

type Config struct {
	Catalog     catalog.Catalog
	Clock       clock.Clock
	DataStore   datastore.DataStore
	ServerCA    ca.ServerCA
	TrustDomain spiffeid.TrustDomain
}

Config is the service configuration

type Service

type Service struct {
	agentv1.UnsafeAgentServer
	// contains filtered or unexported fields
}

Service implements the v1 agent service

func New

func New(config Config) *Service

New creates a new agent service

func (*Service) AttestAgent

func (s *Service) AttestAgent(stream agentv1.Agent_AttestAgentServer) error

AttestAgent attests the authenticity of the given agent.

func (*Service) BanAgent

func (s *Service) BanAgent(ctx context.Context, req *agentv1.BanAgentRequest) (*emptypb.Empty, error)

BanAgent sets the agent with the given SpiffeID to the banned state.

func (*Service) CountAgents added in v1.0.0

CountAgents returns the total number of agents.

func (*Service) CreateJoinToken

func (s *Service) CreateJoinToken(ctx context.Context, req *agentv1.CreateJoinTokenRequest) (*types.JoinToken, error)

CreateJoinToken returns a new JoinToken for an agent.

func (*Service) DeleteAgent

func (s *Service) DeleteAgent(ctx context.Context, req *agentv1.DeleteAgentRequest) (*emptypb.Empty, error)

DeleteAgent removes the agent with the given SpiffeID.

func (*Service) GetAgent

func (s *Service) GetAgent(ctx context.Context, req *agentv1.GetAgentRequest) (*types.Agent, error)

GetAgent returns the agent associated with the given SpiffeID.

func (*Service) ListAgents

ListAgents returns an optionally filtered and/or paginated list of agents.

func (*Service) PostStatus added in v1.7.2

PostStatus post agent status

func (*Service) RenewAgent

RenewAgent renews the SVID of the agent with the given SpiffeID.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL