from pyzrpc.meta.meta import ServiceMeta, WorkMeta
from pyzrpc.meta.observer import ObserverMeta, SubjectMeta

CONFIG_SELF_FUNCTION_KEY = 'self'

CONFIG_RPC_FUNCTION_KEY = 'RpcFunction'
CONFIG_WORK_FUNCTION_KEY = 'WorkFunction'
CONFIG_RPC_FUNCTION_PARAM_KEY = 'param_name'
CONFIG_RPC_FUNCTION_DEFAULT_VALUE_KEY = 'default_value'

CONFIG_RPC_FUNCTION_NAME_KEY = 'service_name'
CONFIG_WORK_FUNCTION_NAME_KEY = 'work_name'

CONFIG_RPC_PROXY_RPC_KEY = 'rpc'
CONFIG_RPC_PROXY_NAME_KEY = 'zerorpc'
CONFIG_RPC_PROXY_METHOD_NAME_KEY = 'call'

CONFIG_ROOT_PATH_KEY = 'ROOT_PATH'
CONFIG_RPC_CONFIG_KEY = 'RABBITMQ_CONFIG'
CONFIG_AMQP_URI_KEY = 'AMQP_URI'

CONFIG_SOCKET_BIND_IP = '8.8.8.8'
CONFIG_SOCKET_BIND_PORT = 80
CONFIG_SOCKET_SHUTDOWN_SLEEP = 2

CONFIG_DEFAULT_TIMEZONE = 'Asia/Shanghai'
CONFIG_DEFAULT_FORMAT = '%Y%m%d%H%M%S'

CONFIG_MONGO_CONFIG_KEY = 'MONGODB_CONFIG'
CONFIG_MONGO_MONGO_DBNAME_KEY = 'ZERORPC'

CONFIG_RABBIT_CONFIG_KEY = 'RABBITMQ_CONFIG'

CONFIG_MONGO_FIELD_NAME_KEY = 'name'
CONFIG_MONGO_FIELD_SERVICE_PID_KEY = 'service_pid'
CONFIG_MONGO_FIELD_SERVICE_NAME_KEY = 'service_name'
CONFIG_MONGO_FIELD_SERVICE_IPADDR_KEY = 'service_ipaddr'
CONFIG_MONGO_FIELD_SERVICE_VERSION_KEY = 'service_version'
CONFIG_MONGO_FIELD_SERVICE_FUNCTIONS_KEY = 'service_functions'

CONFIG_MONGO_FIELD_WORK_PID_KEY = 'work_pid'
CONFIG_MONGO_FIELD_WORK_NAME_KEY = 'work_name'
CONFIG_MONGO_FIELD_WORK_IPADDR_KEY = 'work_ipaddr'
CONFIG_MONGO_FIELD_WORK_VERSION_KEY = 'work_version'
CONFIG_MONGO_FIELD_WORK_FUNCTIONS_KEY = 'work_functions'
CONFIG_MONGO_FIELD_WORK_MAX_PROCESS_KEY = 'work_max_process'
CONFIG_MONGO_FIELD_WORK_RUN_PROCESS_KEY = 'work_run_process'

CONFIG_MONGO_FIELD_TASK_ID_KEY = 'task_id'
