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
--- | |
# Source: mongodb-enterprise-operator/templates/roles.yaml | |
--- | |
kind: Role | |
apiVersion: rbac.authorization.k8s.io/v1 | |
metadata: | |
name: mongodb-enterprise-operator | |
rules: | |
- apiGroups: |
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: mongodb.com/v1 | |
kind: MongoDB | |
metadata: | |
name: my-scram-enabled-replica-set | |
spec: | |
type: ReplicaSet | |
members: 3 | |
# Using a version >= 4.0 will enable SCRAM-SHA-256 authentication |
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 ie.gmit.sw.controllers; | |
/* | |
POJO class, just needs an empty constructor | |
and getters and setters. | |
returned as | |
{ | |
"name": name, |
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 ( | |
"fmt" | |
"math/rand" | |
"regexp" | |
"strings" | |
"time" | |
) |
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
import java.io.Serializable; | |
// must implement Serializable in order to be sent | |
public class Message implements Serializable{ | |
private final String text; | |
public Message(String text) { | |
this.text = text; | |
} |
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
import java.io.DataOutputStream; | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import java.net.Socket; | |
public class Client { | |
public static void main(String[] args) throws IOException { | |
// need host and port, we want to connect to the ServerSocket at port 7777 | |
Socket socket = new Socket("localhost", 7777); | |
System.out.println("Connected!"); |