zrok/agent/grpc.go

17 lines
369 B
Go
Raw Normal View History

2024-08-23 17:31:46 +02:00
package agent
import (
"context"
2024-08-23 18:31:02 +02:00
"github.com/openziti/zrok/agent/agentGrpc"
2024-08-23 18:27:20 +02:00
"github.com/openziti/zrok/build"
2024-08-23 17:31:46 +02:00
)
type agentGrpcImpl struct {
2024-08-23 18:31:02 +02:00
agentGrpc.UnimplementedAgentServer
2024-08-23 17:31:46 +02:00
}
2024-08-23 18:31:02 +02:00
func (s *agentGrpcImpl) Version(ctx context.Context, req *agentGrpc.VersionRequest) (*agentGrpc.VersionReply, error) {
2024-08-23 18:27:20 +02:00
v := build.String()
2024-08-23 18:31:02 +02:00
return &agentGrpc.VersionReply{V: &v}, nil
2024-08-23 17:31:46 +02:00
}