cisco-ie / pipeline-gnmi

A Model-Driven Telemetry collector based on the open-source tool pipeline
Apache License 2.0
32 stars 6 forks source link

Bring your own Proto files #55

Open nleiva opened 5 years ago

nleiva commented 5 years ago

Now that the vendor folder is gone and we are using Go modules, we can import XR YANG proto files from any repo we want to. Still thinking how we could provide this as a functionality to the user, but all we need to do, to bring a different set of proto files is to modify the importing path of codec_gpb.go, xport_grpc_test.go, pipeline.go, etc. to point to a repo other than github.com/cisco/bigmuddy-network-telemetry-proto. Then compile again.

import (
        ...
    telem "github.com/cisco/bigmuddy-network-telemetry-proto/proto_go"
    pdt "github.com/cisco/bigmuddy-network-telemetry-proto/proto_go/old/telemetry"
        ...
)

Go generate could do this for us, but not sure if it something we want to support.

remingtonc commented 5 years ago

This is what cisco-ie/cisco-proto is for e.g. https://github.com/cisco-ie/cisco-proto/tree/master/codegen/go/xr

nleiva commented 5 years ago

Right, the question is now whether we want to provide a mechanism to compile Pipeline using any of those. It's something simple to script.