View liveness-tcp.yaml
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: Pod | |
metadata: | |
name: goproxy | |
labels: | |
app: goproxy | |
spec: | |
containers: | |
- name: goproxy | |
image: k8s.gcr.io/goproxy:0.1 |
View liveness-http.yaml
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: Pod | |
metadata: | |
labels: | |
test: liveness | |
name: live-http | |
spec: | |
containers: | |
- name: liveness | |
image: k8s.gcr.io/liveness |
View liveness-exec.yaml
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: Pod | |
metadata: | |
labels: | |
test: liveness | |
name: live-exec | |
spec: | |
containers: | |
- name: liveness | |
image: k8s.gcr.io/busybox |
View goflags_output.sh
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
BoolFlag is not passed !!! | |
Boolean Flag is false | |
String Flag is Hello There! | |
Int Flag is 4 |
View goflags_visited_full.go
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" | |
"fmt" | |
"os" | |
) | |
// Define the flag | |
var help = flag.Bool("help", false, "Show help") |
View goflags_visit.go
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
func isFlagPassed(name string) bool { | |
found := false | |
flag.Visit(func(f *flag.Flag) { | |
if f.Name == name { | |
found = true | |
} | |
}) | |
return found | |
} |
View BuilderPattern3.java
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 builder; | |
public class Main { | |
public static void main(String[] args) { | |
User user1 = new User.UserBuilder("Anjana", "Shankar") | |
.build(); | |
System.out.println(user1); | |
User user2 = new User.UserBuilder("Random", "User1") |
View BuilderPattern2.java
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 builder; | |
public class User { | |
private String firstName; | |
private String lastName; | |
private int age; | |
private String email; | |
private User(UserBuilder builder) { | |
this.firstName = builder.firstName; |
View BuilderPattern1.java
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 class User { | |
private String firstName; | |
private String lastName; | |
private int age; | |
private String email; | |
public User(String firstname, String lastname, int age, String email) { | |
this.firstname = firstname; | |
this.lastname = lastname; |
View goflags.go
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" | |
"fmt" | |
"os" | |
) | |
// Define the flag |
NewerOlder