init add remove

This commit is contained in:
jackdaw@loafle.com 2017-04-13 18:18:16 +09:00
parent 39db010dbe
commit 6857411be9
9 changed files with 209 additions and 0 deletions

View File

@ -16,6 +16,14 @@
<version>1.0.0-SNAPSHOT</version> <version>1.0.0-SNAPSHOT</version>
<name>com.loafle.overflow.crawler</name> <name>com.loafle.overflow.crawler</name>
<dependencies>
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.8.8</version>
</dependency>
</dependencies>
</project> </project>

View File

@ -0,0 +1,7 @@
package com.loafle.overflow.crawler.config;
/**
* Created by root on 17. 4. 13.
*/
public class Auth {
}

View File

@ -0,0 +1,55 @@
package com.loafle.overflow.crawler.config;
import java.util.List;
/**
* Created by root on 17. 4. 13.
*/
public class Config {
private String id;
private Target target;
private Schedule schedule;
private Crawler crawler;
private List<Item> items;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Target getTarget() {
return target;
}
public void setTarget(Target target) {
this.target = target;
}
public Schedule getSchedule() {
return schedule;
}
public void setSchedule(Schedule schedule) {
this.schedule = schedule;
}
public Crawler getCrawler() {
return crawler;
}
public void setCrawler(Crawler crawler) {
this.crawler = crawler;
}
public List<Item> getItems() {
return items;
}
public void setItems(List<Item> items) {
this.items = items;
}
}

View File

@ -0,0 +1,43 @@
package com.loafle.overflow.crawler.config;
/**
* Created by root on 17. 4. 13.
*/
public class Connection {
private String ip;
private String port;
private String portType;
private boolean ssl;
public String getIp() {
return ip;
}
public void setIp(String ip) {
this.ip = ip;
}
public String getPort() {
return port;
}
public void setPort(String port) {
this.port = port;
}
public String getPortType() {
return portType;
}
public void setPortType(String portType) {
this.portType = portType;
}
public boolean isSsl() {
return ssl;
}
public void setSsl(boolean ssl) {
this.ssl = ssl;
}
}

View File

@ -0,0 +1,25 @@
package com.loafle.overflow.crawler.config;
/**
* Created by root on 17. 4. 13.
*/
public class Crawler {
private String name;
private String container;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getContainer() {
return container;
}
public void setContainer(String container) {
this.container = container;
}
}

View File

@ -0,0 +1,7 @@
package com.loafle.overflow.crawler.config;
/**
* Created by root on 17. 4. 13.
*/
public class Item {
}

View File

@ -0,0 +1,16 @@
package com.loafle.overflow.crawler.config;
/**
* Created by root on 17. 4. 13.
*/
public class Schedule {
private String interval;
public String getInterval() {
return interval;
}
public void setInterval(String interval) {
this.interval = interval;
}
}

View File

@ -0,0 +1,25 @@
package com.loafle.overflow.crawler.config;
/**
* Created by root on 17. 4. 13.
*/
public class Target {
private Auth auth;
private Connection connection;
public Auth getAuth() {
return auth;
}
public void setAuth(Auth auth) {
this.auth = auth;
}
public Connection getConnection() {
return connection;
}
public void setConnection(Connection connection) {
this.connection = connection;
}
}

View File

@ -0,0 +1,23 @@
{
"id" : "SOEJWEOJWOEJOSDJFOASDJFOSDFO2903870928734",
"target" : {
"connection" : {
"ip" : "192.168.1.104",
"port" : "6379",
"ssl" : false,
"portType" : "tcp"
},
"auth" : {
}
},
"schedule" : {
"interval" : "10"
},
"crawler" : {
"name":"redis_protocol_crawler",
"container":"network_crawler"
},
"items" : [
]
}