This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"flag" | |
"log" | |
"io" | |
"net" | |
"golang.org/x/net/proxy" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: {{build.name}} | |
spec: | |
type: ClusterIP | |
selector: | |
app: {{build.name}} | |
ports: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private int offset = 0; | |
@Override | |
protected void onTransport(final Transport transport) | |
{ | |
ByteBuf bytes = getPooledNettyBytes(transport); | |
// null means nothing to be written | |
if (bytes != null) | |
{ | |
final int size = bytes.readableBytes(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* this method will change the readerIndex on bytes to the latest read position | |
*/ | |
public void pump(ByteBuf bytes) | |
{ | |
if (bytes.readableBytes() < 8) | |
{ | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void pump(ByteBuf bytes) | |
{ | |
if (bytes.readableBytes() < 8) | |
{ | |
return; | |
} | |
try | |
{ |