github.com/grafana/pyroscope@v1.18.0/pkg/util/httpgrpc/httpgrpcconnect/httpgrpc.connect.mux.go (about) 1 // Code generated by protoc-gen-connect-go-mux. DO NOT EDIT. 2 // 3 // Source: util/httpgrpc/httpgrpc.proto 4 5 package httpgrpcconnect 6 7 import ( 8 connect "connectrpc.com/connect" 9 mux "github.com/gorilla/mux" 10 ) 11 12 // This is a compile-time assertion to ensure that this generated file and the connect package are 13 // compatible. If you get a compiler error that this constant is not defined, this code was 14 // generated with a version of connect newer than the one compiled into your binary. You can fix the 15 // problem by either regenerating this code with an older version of connect or updating the connect 16 // version compiled into your binary. 17 const _ = connect.IsAtLeastVersion0_1_0 18 19 // RegisterHTTPHandler register an HTTP handler to a mux.Router from the service implementation. 20 func RegisterHTTPHandler(mux *mux.Router, svc HTTPHandler, opts ...connect.HandlerOption) { 21 mux.Handle("/httpgrpc.HTTP/Handle", connect.NewUnaryHandler( 22 "/httpgrpc.HTTP/Handle", 23 svc.Handle, 24 opts..., 25 )) 26 }