Thrift Server. Golang

Создание сервера

transportFactory := thrift.NewTFramedTransportFactoryConf(thrift.NewTTransportFactory(), nil)
protocolFactory := thrift.NewTBinaryProtocolFactoryConf(nil)

Debug

func main() {
	var ts TrinoService
 
	transportFactory := thrift.NewTFramedTransportFactoryConf(thrift.NewTTransportFactory(), nil)
	protocolFactoryBinary := thrift.NewTBinaryProtocolFactoryConf(nil)
 
	protocolFactoryDebug := thrift.NewTDebugProtocolFactoryWithLogger(protocolFactoryBinary, "log", thrift.StdLogger(log.Default()))
 
	transport, err := thrift.NewTServerSocket(":9998")
	if err != nil {
		log.Fatal(err)
	}
 
	processor := trino.NewTrinoThriftServiceProcessor(&ts)
	server := thrift.NewTSimpleServer4(processor, transport, transportFactory, protocolFactoryDebug)
	log.Fatal(server.Serve())
}

Клиент