Module: Spiffe::Workload::ProtoHelper

Defined in:
lib/spiffe/workload/proto_helper.rb

Constant Summary collapse

PROTO_PATH =
File.expand_path('../../../proto/spiffe/workload.proto', __dir__)

Class Method Summary collapse

Class Method Details

.generate_instructionsObject



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/spiffe/workload/proto_helper.rb', line 22

def self.generate_instructions
  <<~INSTRUCTIONS
    To generate Ruby gRPC stubs from proto files:
    
    1. Install grpc-tools:
       gem install grpc-tools
    
    2. Generate the stubs:
       rake generate_protos
    
    Or manually:
       grpc_tools_ruby_protoc \\
         -I proto \\
         --ruby_out=lib \\
         --grpc_out=lib \\
         proto/spiffe/workload.proto
    
    This will create:
       - lib/spiffe/workload_pb.rb (message definitions)
       - lib/spiffe/workload_services_pb.rb (gRPC service client)
  INSTRUCTIONS
end