From 781bd5f2f6b21b5dfd753d272bef7c7c5b04d19d Mon Sep 17 00:00:00 2001 From: Felipe Cavalcanti Date: Mon, 29 Jul 2024 12:57:01 -0300 Subject: [PATCH] Refactor project preparing for v3 new structure --- Makefile | 22 +- benchmark/benchmark_test.go | 2 +- cmd/repl.go | 42 ++ cmd/root.go | 41 + docs/cli.md | 2 +- e2e/e2e_test.go | 6 +- examples/demo/chat/main.go | 14 +- examples/demo/cluster/main.go | 18 +- examples/demo/cluster/services/connector.go | 8 +- examples/demo/cluster/services/room.go | 8 +- examples/demo/cluster_grpc/main.go | 20 +- .../demo/cluster_grpc/services/connector.go | 6 +- examples/demo/cluster_grpc/services/room.go | 8 +- examples/demo/custom_metrics/main.go | 10 +- examples/demo/custom_metrics/services/room.go | 6 +- examples/demo/pipeline/main.go | 8 +- examples/demo/rate_limiting/main.go | 14 +- examples/demo/rate_limiting/services/room.go | 2 +- examples/demo/worker/main.go | 10 +- examples/demo/worker/services/metagame.go | 6 +- examples/demo/worker/services/room.go | 8 +- examples/demo/worker/services/worker.go | 6 +- examples/testing/main.go | 28 +- go.mod | 25 +- go.sum | 56 ++ go.work | 1 - go.work.sum | 5 +- main.go | 23 + pitaya-cli/LICENSE | 19 - pitaya-cli/Makefile | 7 - pitaya-cli/README.md | 130 ---- pitaya-cli/go.mod | 83 --- pitaya-cli/go.sum | 698 ------------------ {acceptor => pkg/acceptor}/acceptor.go | 0 .../acceptor}/fixtures/server.crt | 0 .../acceptor}/fixtures/server.key | 0 .../acceptor}/proxyprotowrapper.go | 2 +- {acceptor => pkg/acceptor}/tcp_acceptor.go | 6 +- .../acceptor}/tcp_acceptor_test.go | 6 +- {acceptor => pkg/acceptor}/ws_acceptor.go | 8 +- .../acceptor}/ws_acceptor_test.go | 6 +- .../acceptorwrapper}/base.go | 2 +- .../acceptorwrapper}/base_test.go | 4 +- .../acceptorwrapper}/rate_limiter.go | 8 +- .../acceptorwrapper}/rate_limiter_test.go | 4 +- .../acceptorwrapper}/rate_limiting_wrapper.go | 6 +- .../rate_limiting_wrapper_test.go | 4 +- .../acceptorwrapper}/wrapper.go | 2 +- {agent => pkg/agent}/agent.go | 26 +- {agent => pkg/agent}/agent_remote.go | 22 +- {agent => pkg/agent}/agent_remote_test.go | 22 +- {agent => pkg/agent}/agent_test.go | 28 +- {agent => pkg/agent}/mocks/agent.go | 6 +- app.go => pkg/app.go | 46 +- app_test.go => pkg/app_test.go | 28 +- builder.go => pkg/builder.go | 34 +- builder_test.go => pkg/builder_test.go | 4 +- {client => pkg/client}/client.go | 18 +- {client => pkg/client}/client_test.go | 6 +- {client => pkg/client}/pitayaclient.go | 4 +- {client => pkg/client}/protoclient.go | 6 +- {cluster => pkg/cluster}/cluster.go | 18 +- .../cluster}/etcd_service_discovery.go | 8 +- .../cluster}/etcd_service_discovery_test.go | 6 +- {cluster => pkg/cluster}/grpc_rpc_client.go | 24 +- .../cluster}/grpc_rpc_client_test.go | 22 +- {cluster => pkg/cluster}/grpc_rpc_server.go | 6 +- .../cluster}/grpc_rpc_server_test.go | 8 +- {cluster => pkg/cluster}/info_retriever.go | 2 +- .../cluster}/info_retriever_test.go | 2 +- {cluster => pkg/cluster}/mocks/cluster.go | 10 +- .../cluster}/mocks/service_discovery.go | 2 +- {cluster => pkg/cluster}/nats_rpc_client.go | 22 +- .../cluster}/nats_rpc_client_test.go | 20 +- {cluster => pkg/cluster}/nats_rpc_common.go | 2 +- .../cluster}/nats_rpc_common_test.go | 2 +- {cluster => pkg/cluster}/nats_rpc_server.go | 16 +- .../cluster}/nats_rpc_server_test.go | 16 +- {cluster => pkg/cluster}/server.go | 2 +- {cluster => pkg/cluster}/server_test.go | 0 {cluster => pkg/cluster}/service_discovery.go | 2 +- component.go => pkg/component.go | 4 +- {component => pkg/component}/base.go | 0 {component => pkg/component}/component.go | 0 {component => pkg/component}/method.go | 2 +- {component => pkg/component}/method_test.go | 2 +- {component => pkg/component}/options.go | 0 {component => pkg/component}/options_test.go | 0 {component => pkg/component}/service.go | 4 +- {component => pkg/component}/service_test.go | 4 +- component_test.go => pkg/component_test.go | 4 +- {config => pkg/config}/config.go | 2 +- {config => pkg/config}/config_test.go | 0 {config => pkg/config}/viper_config.go | 0 {conn => pkg/conn}/codec/constants.go | 0 .../conn}/codec/mocks/packet_decoder.go | 2 +- .../conn}/codec/mocks/packet_encoder.go | 2 +- {conn => pkg/conn}/codec/packet_decoder.go | 2 +- {conn => pkg/conn}/codec/packet_encoder.go | 2 +- .../conn}/codec/pomelo_packet_decoder.go | 2 +- .../conn}/codec/pomelo_packet_decoder_test.go | 2 +- .../conn}/codec/pomelo_packet_encoder.go | 2 +- .../conn}/codec/pomelo_packet_encoder_test.go | 2 +- {conn => pkg/conn}/codec/utils.go | 2 +- .../fixtures/test_invalid_message.golden | 0 .../message/fixtures/test_must_gzip.golden | Bin .../message/fixtures/test_notify_type.golden | 0 .../test_notify_type_compressed.golden | Bin .../message/fixtures/test_push_type.golden | 0 .../fixtures/test_push_type_compressed.golden | Bin .../message/fixtures/test_reponse_type.golden | Bin .../test_reponse_type_with_data.golden | Bin .../test_reponse_type_with_error.golden | Bin .../fixtures/test_reponse_type_with_id.golden | 0 .../message/fixtures/test_request_type.golden | Bin .../test_request_type_compressed.golden | Bin .../message/fixtures/test_wrong_type.golden | 0 {conn => pkg/conn}/message/message.go | 0 {conn => pkg/conn}/message/message_encoder.go | 2 +- {conn => pkg/conn}/message/message_test.go | 2 +- .../conn}/message/mocks/message_encoder.go | 2 +- {conn => pkg/conn}/packet/constants.go | 0 {conn => pkg/conn}/packet/packet.go | 0 {conn => pkg/conn}/packet/packet_test.go | 0 {constants => pkg/constants}/const.go | 0 {constants => pkg/constants}/errors.go | 0 {constants => pkg/constants}/version.go | 0 {context => pkg/context}/context.go | 2 +- {context => pkg/context}/context_test.go | 4 +- .../context}/fixtures/one_element.golden | 0 .../fixtures/registered_struct.golden | 0 .../default_struct_validator.go | 0 .../default_struct_validator_test.go | 0 .../defaultpipelines}/struct_validator.go | 0 .../docgenerator}/descriptors.go | 2 +- .../docgenerator}/descriptors_test.go | 4 +- .../docgenerator}/generator.go | 4 +- .../docgenerator}/generator_test.go | 4 +- {errors => pkg/errors}/errors.go | 0 {errors => pkg/errors}/errors_test.go | 0 group.go => pkg/group.go | 4 +- group_test.go => pkg/group_test.go | 6 +- {groups => pkg/groups}/etcd_group_service.go | 6 +- .../groups}/etcd_group_service_test.go | 4 +- {groups => pkg/groups}/group_service.go | 0 {groups => pkg/groups}/group_service_test.go | 2 +- .../groups}/memory_group_service.go | 4 +- .../groups}/memory_group_service_test.go | 2 +- {helpers => pkg/helpers}/helpers.go | 0 {helpers => pkg/helpers}/type_support.go | 0 {interfaces => pkg/interfaces}/interfaces.go | 0 .../interfaces}/mocks/interfaces.go | 0 kick.go => pkg/kick.go | 6 +- kick_test.go => pkg/kick_test.go | 10 +- .../logger}/interfaces/interfaces.go | 0 {logger => pkg/logger}/logger.go | 4 +- {logger => pkg/logger}/logger_test.go | 2 +- {logger => pkg/logger}/logrus/logrus.go | 2 +- {logger => pkg/logger}/test/test.go | 4 +- {metrics => pkg/metrics}/constants.go | 0 {metrics => pkg/metrics}/mocks/reporter.go | 0 .../metrics}/mocks/statsd_reporter.go | 0 {metrics => pkg/metrics}/models/models.go | 0 .../metrics}/prometheus_reporter.go | 8 +- {metrics => pkg/metrics}/report.go | 6 +- {metrics => pkg/metrics}/report_test.go | 8 +- .../metrics}/reporter_interfaces.go | 0 {metrics => pkg/metrics}/statsd_reporter.go | 6 +- .../metrics}/statsd_reporter_test.go | 4 +- {mocks => pkg/mocks}/acceptor.go | 2 +- {mocks => pkg/mocks}/app.go | 16 +- module.go => pkg/module.go | 4 +- module_test.go => pkg/module_test.go | 4 +- {modules => pkg/modules}/api_docs_gen.go | 4 +- {modules => pkg/modules}/base.go | 0 {modules => pkg/modules}/binary.go | 4 +- {modules => pkg/modules}/binary_test.go | 0 {modules => pkg/modules}/binary_windows.go | 4 +- {modules => pkg/modules}/binding_storage.go | 10 +- {modules => pkg/modules}/unique_session.go | 4 +- .../networkentity}/mocks/networkentity.go | 2 +- .../networkentity}/networkentity.go | 2 +- {pipeline => pkg/pipeline}/pipeline.go | 2 +- {pipeline => pkg/pipeline}/pipeline_test.go | 0 {protos => pkg/protos}/bind.pb.go | 0 {protos => pkg/protos}/doc.pb.go | 0 {protos => pkg/protos}/docmsg.pb.go | 0 {protos => pkg/protos}/error.pb.go | 0 {protos => pkg/protos}/kick.pb.go | 0 {protos => pkg/protos}/mocks/pitaya.go | 2 +- {protos => pkg/protos}/msg.pb.go | 0 {protos => pkg/protos}/pitaya.pb.go | 0 {protos => pkg/protos}/protodescriptor.pb.go | 0 {protos => pkg/protos}/push.pb.go | 0 {protos => pkg/protos}/request.pb.go | 0 {protos => pkg/protos}/response.pb.go | 0 {protos => pkg/protos}/session.pb.go | 0 {protos => pkg/protos}/test/somestruct.pb.go | 0 {protos => pkg/protos}/test/testrequest.pb.go | 0 .../protos}/test/testresponse.pb.go | 0 push.go => pkg/push.go | 10 +- push_test.go => pkg/push_test.go | 12 +- {remote => pkg/remote}/sys.go | 8 +- {remote => pkg/remote}/sys_test.go | 6 +- reporters.go => pkg/reporters.go | 8 +- {route => pkg/route}/route.go | 2 +- {route => pkg/route}/route_test.go | 0 {router => pkg/router}/router.go | 12 +- {router => pkg/router}/router_test.go | 10 +- rpc.go => pkg/rpc.go | 6 +- rpc_test.go => pkg/rpc_test.go | 28 +- {serialize => pkg/serialize}/json/json.go | 0 .../serialize}/json/json_test.go | 0 .../serialize}/mocks/serializer.go | 0 .../fixtures/TestMarshal/test_ok.golden | 0 .../serialize}/protobuf/protobuf.go | 2 +- .../serialize}/protobuf/protobuf_test.go | 6 +- {serialize => pkg/serialize}/serializer.go | 4 +- {service => pkg/service}/base_service.go | 2 +- .../fixtures/unmarshal_remote_test_1.golden | 0 .../fixtures/unmarshal_remote_test_2.golden | 0 .../fixtures/unmarshal_remote_test_3.golden | 0 {service => pkg/service}/handler.go | 40 +- {service => pkg/service}/handler_pool.go | 20 +- {service => pkg/service}/handler_pool_test.go | 18 +- {service => pkg/service}/handler_test.go | 38 +- {service => pkg/service}/remote.go | 36 +- {service => pkg/service}/remote_test.go | 34 +- {service => pkg/service}/util.go | 24 +- {service => pkg/service}/util_test.go | 14 +- .../fixtures/testSessionSetData_1.golden | 0 .../fixtures/testSessionSetData_2.golden | 0 .../fixtures/testSessionSetData_3.golden | 0 .../fixtures/testSessionSetData_4.golden | 0 .../fixtures/testSessionSetData_5.golden | 0 .../fixtures/testUpdateEncodedData_1.golden | 0 .../fixtures/testUpdateEncodedData_2.golden | 0 .../fixtures/testUpdateEncodedData_3.golden | 0 .../fixtures/testUpdateEncodedData_4.golden | 0 .../fixtures/testUpdateEncodedData_5.golden | 0 {session => pkg/session}/mocks/session.go | 4 +- {session => pkg/session}/session.go | 8 +- {session => pkg/session}/session_test.go | 8 +- {session => pkg/session}/static.go | 0 {session => pkg/session}/test/static_test.go | 4 +- static.go => pkg/static.go | 18 +- static_test.go => pkg/static_test.go | 22 +- timer.go => pkg/timer.go | 4 +- {timer => pkg/timer}/timer.go | 2 +- {timer => pkg/timer}/timer_test.go | 2 +- timer_test.go => pkg/timer_test.go | 4 +- {tracing => pkg/tracing}/otel.go | 2 +- {tracing => pkg/tracing}/span.go | 6 +- {tracing => pkg/tracing}/span_test.go | 4 +- {util => pkg/util}/compression/compression.go | 0 .../util}/compression/compression_test.go | 2 +- .../compression_deflate_test_1.golden | Bin .../compression_deflate_test_2.golden | Bin .../compression_deflate_test_3.golden | Bin .../util}/fixtures/gob_encode_test_1.golden | Bin .../util}/fixtures/gob_encode_test_2.golden | Bin .../util}/fixtures/gob_encode_test_3.golden | Bin {util => pkg/util}/util.go | 22 +- {util => pkg/util}/util_test.go | 12 +- {worker => pkg/worker}/constants.go | 0 {worker => pkg/worker}/mocks/rpc_job.go | 0 {worker => pkg/worker}/models.go | 0 {worker => pkg/worker}/report.go | 4 +- {worker => pkg/worker}/report_test.go | 4 +- {worker => pkg/worker}/rpc_job.go | 0 {worker => pkg/worker}/worker.go | 8 +- {worker => pkg/worker}/worker_test.go | 2 +- {pitaya-cli => repl}/commands.go | 4 +- {pitaya-cli => repl}/file.go | 2 +- {pitaya-cli => repl}/helpers.go | 4 +- {pitaya-cli => repl}/log.go | 2 +- {pitaya-cli => repl}/main.go | 20 +- {pitaya-cli => repl}/shell.go | 2 +- xk6-pitaya/Dockerfile | 2 +- xk6-pitaya/client.go | 6 +- xk6-pitaya/module.go | 4 +- 281 files changed, 910 insertions(+), 1672 deletions(-) create mode 100644 cmd/repl.go create mode 100644 cmd/root.go create mode 100644 main.go delete mode 100644 pitaya-cli/LICENSE delete mode 100644 pitaya-cli/Makefile delete mode 100644 pitaya-cli/README.md delete mode 100644 pitaya-cli/go.mod delete mode 100644 pitaya-cli/go.sum rename {acceptor => pkg/acceptor}/acceptor.go (100%) rename {acceptor => pkg/acceptor}/fixtures/server.crt (100%) rename {acceptor => pkg/acceptor}/fixtures/server.key (100%) rename {acceptor => pkg/acceptor}/proxyprotowrapper.go (97%) rename {acceptor => pkg/acceptor}/tcp_acceptor.go (97%) rename {acceptor => pkg/acceptor}/tcp_acceptor_test.go (98%) rename {acceptor => pkg/acceptor}/ws_acceptor.go (97%) rename {acceptor => pkg/acceptor}/ws_acceptor_test.go (98%) rename {acceptorwrapper => pkg/acceptorwrapper}/base.go (97%) rename {acceptorwrapper => pkg/acceptorwrapper}/base_test.go (95%) rename {acceptorwrapper => pkg/acceptorwrapper}/rate_limiter.go (94%) rename {acceptorwrapper => pkg/acceptorwrapper}/rate_limiter_test.go (97%) rename {acceptorwrapper => pkg/acceptorwrapper}/rate_limiting_wrapper.go (92%) rename {acceptorwrapper => pkg/acceptorwrapper}/rate_limiting_wrapper_test.go (94%) rename {acceptorwrapper => pkg/acceptorwrapper}/wrapper.go (97%) rename {agent => pkg/agent}/agent.go (96%) rename {agent => pkg/agent}/agent_remote.go (91%) rename {agent => pkg/agent}/agent_remote_test.go (94%) rename {agent => pkg/agent}/agent_test.go (98%) rename {agent => pkg/agent}/mocks/agent.go (98%) rename app.go => pkg/app.go (93%) rename app_test.go => pkg/app_test.go (96%) rename builder.go => pkg/builder.go (91%) rename builder_test.go => pkg/builder_test.go (95%) rename {client => pkg/client}/client.go (95%) rename {client => pkg/client}/client_test.go (85%) rename {client => pkg/client}/pitayaclient.go (93%) rename {client => pkg/client}/protoclient.go (98%) rename {cluster => pkg/cluster}/cluster.go (88%) rename {cluster => pkg/cluster}/etcd_service_discovery.go (99%) rename {cluster => pkg/cluster}/etcd_service_discovery_test.go (99%) rename {cluster => pkg/cluster}/grpc_rpc_client.go (94%) rename {cluster => pkg/cluster}/grpc_rpc_client_test.go (95%) rename {cluster => pkg/cluster}/grpc_rpc_server.go (94%) rename {cluster => pkg/cluster}/grpc_rpc_server_test.go (81%) rename {cluster => pkg/cluster}/info_retriever.go (88%) rename {cluster => pkg/cluster}/info_retriever_test.go (88%) rename {cluster => pkg/cluster}/mocks/cluster.go (97%) rename {cluster => pkg/cluster}/mocks/service_discovery.go (98%) rename {cluster => pkg/cluster}/nats_rpc_client.go (93%) rename {cluster => pkg/cluster}/nats_rpc_client_test.go (96%) rename {cluster => pkg/cluster}/nats_rpc_common.go (98%) rename {cluster => pkg/cluster}/nats_rpc_common_test.go (97%) rename {cluster => pkg/cluster}/nats_rpc_server.go (97%) rename {cluster => pkg/cluster}/nats_rpc_server_test.go (97%) rename {cluster => pkg/cluster}/server.go (97%) rename {cluster => pkg/cluster}/server_test.go (100%) rename {cluster => pkg/cluster}/service_discovery.go (96%) rename component.go => pkg/component.go (97%) rename {component => pkg/component}/base.go (100%) rename {component => pkg/component}/component.go (100%) rename {component => pkg/component}/method.go (98%) rename {component => pkg/component}/method_test.go (98%) rename {component => pkg/component}/options.go (100%) rename {component => pkg/component}/options_test.go (100%) rename {component => pkg/component}/service.go (98%) rename {component => pkg/component}/service_test.go (97%) rename component_test.go => pkg/component_test.go (96%) rename {config => pkg/config}/config.go (99%) rename {config => pkg/config}/config_test.go (100%) rename {config => pkg/config}/viper_config.go (100%) rename {conn => pkg/conn}/codec/constants.go (100%) rename {conn => pkg/conn}/codec/mocks/packet_decoder.go (95%) rename {conn => pkg/conn}/codec/mocks/packet_encoder.go (95%) rename {conn => pkg/conn}/codec/packet_decoder.go (95%) rename {conn => pkg/conn}/codec/packet_encoder.go (95%) rename {conn => pkg/conn}/codec/pomelo_packet_decoder.go (97%) rename {conn => pkg/conn}/codec/pomelo_packet_decoder_test.go (97%) rename {conn => pkg/conn}/codec/pomelo_packet_encoder.go (97%) rename {conn => pkg/conn}/codec/pomelo_packet_encoder_test.go (95%) rename {conn => pkg/conn}/codec/utils.go (93%) rename {conn => pkg/conn}/message/fixtures/test_invalid_message.golden (100%) rename {conn => pkg/conn}/message/fixtures/test_must_gzip.golden (100%) rename {conn => pkg/conn}/message/fixtures/test_notify_type.golden (100%) rename {conn => pkg/conn}/message/fixtures/test_notify_type_compressed.golden (100%) rename {conn => pkg/conn}/message/fixtures/test_push_type.golden (100%) rename {conn => pkg/conn}/message/fixtures/test_push_type_compressed.golden (100%) rename {conn => pkg/conn}/message/fixtures/test_reponse_type.golden (100%) rename {conn => pkg/conn}/message/fixtures/test_reponse_type_with_data.golden (100%) rename {conn => pkg/conn}/message/fixtures/test_reponse_type_with_error.golden (100%) rename {conn => pkg/conn}/message/fixtures/test_reponse_type_with_id.golden (100%) rename {conn => pkg/conn}/message/fixtures/test_request_type.golden (100%) rename {conn => pkg/conn}/message/fixtures/test_request_type_compressed.golden (100%) rename {conn => pkg/conn}/message/fixtures/test_wrong_type.golden (100%) rename {conn => pkg/conn}/message/message.go (100%) rename {conn => pkg/conn}/message/message_encoder.go (98%) rename {conn => pkg/conn}/message/message_test.go (99%) rename {conn => pkg/conn}/message/mocks/message_encoder.go (96%) rename {conn => pkg/conn}/packet/constants.go (100%) rename {conn => pkg/conn}/packet/packet.go (100%) rename {conn => pkg/conn}/packet/packet_test.go (100%) rename {constants => pkg/constants}/const.go (100%) rename {constants => pkg/constants}/errors.go (100%) rename {constants => pkg/constants}/version.go (100%) rename {context => pkg/context}/context.go (98%) rename {context => pkg/context}/context_test.go (98%) rename {context => pkg/context}/fixtures/one_element.golden (100%) rename {context => pkg/context}/fixtures/registered_struct.golden (100%) rename {defaultpipelines => pkg/defaultpipelines}/default_struct_validator.go (100%) rename {defaultpipelines => pkg/defaultpipelines}/default_struct_validator_test.go (100%) rename {defaultpipelines => pkg/defaultpipelines}/struct_validator.go (100%) rename {docgenerator => pkg/docgenerator}/descriptors.go (95%) rename {docgenerator => pkg/docgenerator}/descriptors_test.go (88%) rename {docgenerator => pkg/docgenerator}/generator.go (98%) rename {docgenerator => pkg/docgenerator}/generator_test.go (98%) rename {errors => pkg/errors}/errors.go (100%) rename {errors => pkg/errors}/errors_test.go (100%) rename group.go => pkg/group.go (97%) rename group_test.go => pkg/group_test.go (98%) rename {groups => pkg/groups}/etcd_group_service.go (98%) rename {groups => pkg/groups}/etcd_group_service_test.go (97%) rename {groups => pkg/groups}/group_service.go (100%) rename {groups => pkg/groups}/group_service_test.go (99%) rename {groups => pkg/groups}/memory_group_service.go (98%) rename {groups => pkg/groups}/memory_group_service_test.go (98%) rename {helpers => pkg/helpers}/helpers.go (100%) rename {helpers => pkg/helpers}/type_support.go (100%) rename {interfaces => pkg/interfaces}/interfaces.go (100%) rename {interfaces => pkg/interfaces}/mocks/interfaces.go (100%) rename kick.go => pkg/kick.go (93%) rename kick_test.go => pkg/kick_test.go (94%) rename {logger => pkg/logger}/interfaces/interfaces.go (100%) rename {logger => pkg/logger}/logger.go (92%) rename {logger => pkg/logger}/logger_test.go (95%) rename {logger => pkg/logger}/logrus/logrus.go (96%) rename {logger => pkg/logger}/test/test.go (72%) rename {metrics => pkg/metrics}/constants.go (100%) rename {metrics => pkg/metrics}/mocks/reporter.go (100%) rename {metrics => pkg/metrics}/mocks/statsd_reporter.go (100%) rename {metrics => pkg/metrics}/models/models.go (100%) rename {metrics => pkg/metrics}/prometheus_reporter.go (98%) rename {metrics => pkg/metrics}/report.go (96%) rename {metrics => pkg/metrics}/report_test.go (96%) rename {metrics => pkg/metrics}/reporter_interfaces.go (100%) rename {metrics => pkg/metrics}/statsd_reporter.go (96%) rename {metrics => pkg/metrics}/statsd_reporter_test.go (98%) rename {mocks => pkg/mocks}/acceptor.go (99%) rename {mocks => pkg/mocks}/app.go (98%) rename module.go => pkg/module.go (97%) rename module_test.go => pkg/module_test.go (97%) rename {modules => pkg/modules}/api_docs_gen.go (94%) rename {modules => pkg/modules}/base.go (100%) rename {modules => pkg/modules}/binary.go (96%) rename {modules => pkg/modules}/binary_test.go (100%) rename {modules => pkg/modules}/binary_windows.go (97%) rename {modules => pkg/modules}/binding_storage.go (95%) rename {modules => pkg/modules}/unique_session.go (96%) rename {networkentity => pkg/networkentity}/mocks/networkentity.go (98%) rename {networkentity => pkg/networkentity}/networkentity.go (90%) rename {pipeline => pkg/pipeline}/pipeline.go (98%) rename {pipeline => pkg/pipeline}/pipeline_test.go (100%) rename {protos => pkg/protos}/bind.pb.go (100%) rename {protos => pkg/protos}/doc.pb.go (100%) rename {protos => pkg/protos}/docmsg.pb.go (100%) rename {protos => pkg/protos}/error.pb.go (100%) rename {protos => pkg/protos}/kick.pb.go (100%) rename {protos => pkg/protos}/mocks/pitaya.go (99%) rename {protos => pkg/protos}/msg.pb.go (100%) rename {protos => pkg/protos}/pitaya.pb.go (100%) rename {protos => pkg/protos}/protodescriptor.pb.go (100%) rename {protos => pkg/protos}/push.pb.go (100%) rename {protos => pkg/protos}/request.pb.go (100%) rename {protos => pkg/protos}/response.pb.go (100%) rename {protos => pkg/protos}/session.pb.go (100%) rename {protos => pkg/protos}/test/somestruct.pb.go (100%) rename {protos => pkg/protos}/test/testrequest.pb.go (100%) rename {protos => pkg/protos}/test/testresponse.pb.go (100%) rename push.go => pkg/push.go (91%) rename push_test.go => pkg/push_test.go (93%) rename {remote => pkg/remote}/sys.go (92%) rename {remote => pkg/remote}/sys_test.go (97%) rename reporters.go => pkg/reporters.go (84%) rename {route => pkg/route}/route.go (97%) rename {route => pkg/route}/route_test.go (100%) rename {router => pkg/router}/router.go (91%) rename {router => pkg/router}/router_test.go (90%) rename rpc.go => pkg/rpc.go (95%) rename rpc_test.go => pkg/rpc_test.go (83%) rename {serialize => pkg/serialize}/json/json.go (100%) rename {serialize => pkg/serialize}/json/json_test.go (100%) rename {serialize => pkg/serialize}/mocks/serializer.go (100%) rename {serialize => pkg/serialize}/protobuf/fixtures/TestMarshal/test_ok.golden (100%) rename {serialize => pkg/serialize}/protobuf/protobuf.go (97%) rename {serialize => pkg/serialize}/protobuf/protobuf_test.go (95%) rename {serialize => pkg/serialize}/serializer.go (95%) rename {service => pkg/service}/base_service.go (77%) rename {service => pkg/service}/fixtures/unmarshal_remote_test_1.golden (100%) rename {service => pkg/service}/fixtures/unmarshal_remote_test_2.golden (100%) rename {service => pkg/service}/fixtures/unmarshal_remote_test_3.golden (100%) rename {service => pkg/service}/handler.go (92%) rename {service => pkg/service}/handler_pool.go (85%) rename {service => pkg/service}/handler_pool_test.go (94%) rename {service => pkg/service}/handler_test.go (93%) rename {service => pkg/service}/remote.go (93%) rename {service => pkg/service}/remote_test.go (96%) rename {service => pkg/service}/util.go (88%) rename {service => pkg/service}/util_test.go (96%) rename {session => pkg/session}/fixtures/testSessionSetData_1.golden (100%) rename {session => pkg/session}/fixtures/testSessionSetData_2.golden (100%) rename {session => pkg/session}/fixtures/testSessionSetData_3.golden (100%) rename {session => pkg/session}/fixtures/testSessionSetData_4.golden (100%) rename {session => pkg/session}/fixtures/testSessionSetData_5.golden (100%) rename {session => pkg/session}/fixtures/testUpdateEncodedData_1.golden (100%) rename {session => pkg/session}/fixtures/testUpdateEncodedData_2.golden (100%) rename {session => pkg/session}/fixtures/testUpdateEncodedData_3.golden (100%) rename {session => pkg/session}/fixtures/testUpdateEncodedData_4.golden (100%) rename {session => pkg/session}/fixtures/testUpdateEncodedData_5.golden (100%) rename {session => pkg/session}/mocks/session.go (99%) rename {session => pkg/session}/session.go (99%) rename {session => pkg/session}/session_test.go (99%) rename {session => pkg/session}/static.go (100%) rename {session => pkg/session}/test/static_test.go (96%) rename static.go => pkg/static.go (93%) rename static_test.go => pkg/static_test.go (97%) rename timer.go => pkg/timer.go (97%) rename {timer => pkg/timer}/timer.go (99%) rename {timer => pkg/timer}/timer_test.go (99%) rename timer_test.go => pkg/timer_test.go (95%) rename {tracing => pkg/tracing}/otel.go (97%) rename {tracing => pkg/tracing}/span.go (96%) rename {tracing => pkg/tracing}/span_test.go (98%) rename {util => pkg/util}/compression/compression.go (100%) rename {util => pkg/util}/compression/compression_test.go (96%) rename {util => pkg/util}/compression/fixtures/compression_deflate_test_1.golden (100%) rename {util => pkg/util}/compression/fixtures/compression_deflate_test_2.golden (100%) rename {util => pkg/util}/compression/fixtures/compression_deflate_test_3.golden (100%) rename {util => pkg/util}/fixtures/gob_encode_test_1.golden (100%) rename {util => pkg/util}/fixtures/gob_encode_test_2.golden (100%) rename {util => pkg/util}/fixtures/gob_encode_test_3.golden (100%) rename {util => pkg/util}/util.go (92%) rename {util => pkg/util}/util_test.go (96%) rename {worker => pkg/worker}/constants.go (100%) rename {worker => pkg/worker}/mocks/rpc_job.go (100%) rename {worker => pkg/worker}/models.go (100%) rename {worker => pkg/worker}/report.go (94%) rename {worker => pkg/worker}/report_test.go (94%) rename {worker => pkg/worker}/rpc_job.go (100%) rename {worker => pkg/worker}/worker.go (96%) rename {worker => pkg/worker}/worker_test.go (98%) rename {pitaya-cli => repl}/commands.go (98%) rename {pitaya-cli => repl}/file.go (99%) rename {pitaya-cli => repl}/helpers.go (97%) rename {pitaya-cli => repl}/log.go (98%) rename {pitaya-cli => repl}/main.go (81%) rename {pitaya-cli => repl}/shell.go (99%) diff --git a/Makefile b/Makefile index 8666eb76..cb3b024a 100644 --- a/Makefile +++ b/Makefile @@ -15,14 +15,14 @@ TESTABLE_PACKAGES = `go list ./... | $(GREP_CMD) examples | $(GREP_CMD) constant setup: init-submodules @go get ./... -build-cli: +build: @$(MKFOLDER) - @go build -o build/$(BIN) github.com/topfreegames/pitaya/v2/pitaya-cli + @go build -o build/$(BIN) . @echo "build pitaya-cli at ./build/$(BIN)" build-k6-extension: @$(MKFOLDER) - @xk6 build --with github.com/topfreegames/xk6-pitaya=./xk6-pitaya/ --with github.com/topfreegames/pitaya/v2=./ --with google.golang.org/grpc=google.golang.org/grpc@v1.54.1 --output ./build/$(XK6_BIN) + @xk6 build --with github.com/topfreegames/xk6-pitaya=./xk6-pitaya/ --with github.com/topfreegames/pitaya/v3=./ --with google.golang.org/grpc=google.golang.org/grpc@v1.54.1 --output ./build/$(XK6_BIN) @echo "build pitaya k6 extension at ./build/$(XK6_BIN)" init-submodules: @@ -179,23 +179,23 @@ test-coverage-func coverage-func: test-coverage merge-profiles mocks: agent-mock session-mock networkentity-mock pitaya-mock serializer-mock metrics-mock acceptor-mock agent-mock: - @mockgen github.com/topfreegames/pitaya/v2/agent Agent,AgentFactory | sed 's/mock_agent/mocks/' > agent/mocks/agent.go + @mockgen github.com/topfreegames/pitaya/v3/pkg/agent Agent,AgentFactory | sed 's/mock_agent/mocks/' > pkg/agent/mocks/agent.go session-mock: - @mockgen github.com/topfreegames/pitaya/v2/session Session,SessionPool | sed 's/mock_session/mocks/' > session/mocks/session.go + @mockgen github.com/topfreegames/pitaya/v3/pkg/session Session,SessionPool | sed 's/mock_session/mocks/' > pkg/session/mocks/session.go networkentity-mock: - @mockgen github.com/topfreegames/pitaya/v2/networkentity NetworkEntity | sed 's/mock_networkentity/mocks/' > networkentity/mocks/networkentity.go + @mockgen github.com/topfreegames/pitaya/v3/pkg/networkentity NetworkEntity | sed 's/mock_networkentity/mocks/' > pkg/networkentity/mocks/networkentity.go pitaya-mock: - @mockgen github.com/topfreegames/pitaya/v2 Pitaya | sed 's/mock_v2/mocks/' > mocks/app.go + @mockgen github.com/topfreegames/pitaya/v3/pkg Pitaya | sed 's/mock_v2/mocks/' > pkg/mocks/app.go metrics-mock: - @mockgen github.com/topfreegames/pitaya/v2/metrics Reporter | sed 's/mock_metrics/mocks/' > metrics/mocks/reporter.go - @mockgen github.com/topfreegames/pitaya/v2/metrics Client | sed 's/mock_metrics/mocks/' > metrics/mocks/statsd_reporter.go + @mockgen github.com/topfreegames/pitaya/v3/pkg/metrics Reporter | sed 's/mock_metrics/mocks/' > pkg/metrics/mocks/reporter.go + @mockgen github.com/topfreegames/pitaya/v3/pkg/metrics Client | sed 's/mock_metrics/mocks/' > pkg/metrics/mocks/statsd_reporter.go serializer-mock: - @mockgen github.com/topfreegames/pitaya/v2/serialize Serializer | sed 's/mock_serialize/mocks/' > serialize/mocks/serializer.go + @mockgen github.com/topfreegames/pitaya/v3/pkg/serialize Serializer | sed 's/mock_serialize/mocks/' > pkg/serialize/mocks/serializer.go acceptor-mock: - @mockgen github.com/topfreegames/pitaya/v2/acceptor PlayerConn,Acceptor | sed 's/mock_acceptor/mocks/' > mocks/acceptor.go + @mockgen github.com/topfreegames/pitaya/v3/pkg/acceptor PlayerConn,Acceptor | sed 's/mock_acceptor/mocks/' > pkg/mocks/acceptor.go diff --git a/benchmark/benchmark_test.go b/benchmark/benchmark_test.go index 7c267501..d9a29ca4 100644 --- a/benchmark/benchmark_test.go +++ b/benchmark/benchmark_test.go @@ -26,7 +26,7 @@ import ( "testing" "github.com/sirupsen/logrus" - "github.com/topfreegames/pitaya/v2/client" + "github.com/topfreegames/pitaya/v3/pkg/client" ) var clients []*client.Client diff --git a/cmd/repl.go b/cmd/repl.go new file mode 100644 index 00000000..f3dfba4f --- /dev/null +++ b/cmd/repl.go @@ -0,0 +1,42 @@ +/* +Copyright � 2021 Wildlife Studios + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package cmd + +import ( + "github.com/spf13/cobra" + "github.com/topfreegames/pitaya/v3/repl" +) + +var docsRoute string +var fileName string +var prettyJSON bool + +// replCmd opens pitaya REPL tool +var replCmd = &cobra.Command{ + Use: "repl", + Short: "starts pitaya repl tool", + Long: `starts pitaya repl tool`, + Run: func(cmd *cobra.Command, args []string) { + repl.Start(docsRoute, fileName, prettyJSON) + }, +} + +func init() { + replCmd.Flags().StringVarP(&docsRoute, "docs", "d", "", "route containing the documentation") + replCmd.Flags().StringVarP(&fileName, "filename", "f", "", "file containing the commands to run") + replCmd.Flags().BoolVarP(&prettyJSON, "pretty", "p", false, "print pretty jsons") + rootCmd.AddCommand(replCmd) +} diff --git a/cmd/root.go b/cmd/root.go new file mode 100644 index 00000000..40449b87 --- /dev/null +++ b/cmd/root.go @@ -0,0 +1,41 @@ +/* +Copyright 2024 Wildlife Studios + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package cmd + +import ( + "github.com/spf13/cobra" +) + +var cfgFile string + +// rootCmd represents the base command when called without any subcommands +var rootCmd = &cobra.Command{ + Use: "pitaya", + Short: "run pitaya cmd", + Long: `run pitaya cmd`, + // Uncomment the following line if your bare application + // has an action associated with it: + // Run: func(cmd *cobra.Command, args []string) { }, +} + +// Execute adds all child commands to the root command and sets flags appropriately. +// This is called by main.main(). It only needs to happen once to the rootCmd. +func Execute() { + cobra.CheckErr(rootCmd.Execute()) +} + +func init() { +} diff --git a/docs/cli.md b/docs/cli.md index e4e9f3fa..4ac05703 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -6,7 +6,7 @@ A REPL cli client made in go for pitaya. ## Installing ``` -go install github.com/topfreegames/pitaya/v2/pitaya-cli +go install github.com/topfreegames/pitaya/v3/pitaya-cli ``` ## Usage diff --git a/e2e/e2e_test.go b/e2e/e2e_test.go index 7c91db3a..7724f13d 100644 --- a/e2e/e2e_test.go +++ b/e2e/e2e_test.go @@ -31,9 +31,9 @@ import ( "github.com/google/uuid" "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/client" - "github.com/topfreegames/pitaya/v2/conn/message" - "github.com/topfreegames/pitaya/v2/helpers" + "github.com/topfreegames/pitaya/v3/pkg/client" + "github.com/topfreegames/pitaya/v3/pkg/conn/message" + "github.com/topfreegames/pitaya/v3/pkg/helpers" ) var update = flag.Bool("update", false, "update server binary") diff --git a/examples/demo/chat/main.go b/examples/demo/chat/main.go index 1c9fd2fc..08dc4748 100644 --- a/examples/demo/chat/main.go +++ b/examples/demo/chat/main.go @@ -10,13 +10,13 @@ import ( "strings" - "github.com/topfreegames/pitaya/v2" - "github.com/topfreegames/pitaya/v2/acceptor" - "github.com/topfreegames/pitaya/v2/component" - "github.com/topfreegames/pitaya/v2/config" - "github.com/topfreegames/pitaya/v2/groups" - "github.com/topfreegames/pitaya/v2/logger" - "github.com/topfreegames/pitaya/v2/timer" + "github.com/topfreegames/pitaya/v3/pkg" + "github.com/topfreegames/pitaya/v3/pkg/acceptor" + "github.com/topfreegames/pitaya/v3/pkg/component" + "github.com/topfreegames/pitaya/v3/pkg/config" + "github.com/topfreegames/pitaya/v3/pkg/groups" + "github.com/topfreegames/pitaya/v3/pkg/logger" + "github.com/topfreegames/pitaya/v3/pkg/timer" ) type ( diff --git a/examples/demo/cluster/main.go b/examples/demo/cluster/main.go index baf8b74e..3d67916c 100644 --- a/examples/demo/cluster/main.go +++ b/examples/demo/cluster/main.go @@ -9,15 +9,15 @@ import ( "github.com/sirupsen/logrus" "github.com/spf13/viper" - "github.com/topfreegames/pitaya/v2" - "github.com/topfreegames/pitaya/v2/acceptor" - "github.com/topfreegames/pitaya/v2/cluster" - "github.com/topfreegames/pitaya/v2/component" - "github.com/topfreegames/pitaya/v2/config" - "github.com/topfreegames/pitaya/v2/examples/demo/cluster/services" - "github.com/topfreegames/pitaya/v2/groups" - "github.com/topfreegames/pitaya/v2/route" - "github.com/topfreegames/pitaya/v2/tracing" + "github.com/topfreegames/pitaya/v3/examples/demo/cluster/services" + pitaya "github.com/topfreegames/pitaya/v3/pkg" + "github.com/topfreegames/pitaya/v3/pkg/acceptor" + "github.com/topfreegames/pitaya/v3/pkg/cluster" + "github.com/topfreegames/pitaya/v3/pkg/component" + "github.com/topfreegames/pitaya/v3/pkg/config" + "github.com/topfreegames/pitaya/v3/pkg/groups" + "github.com/topfreegames/pitaya/v3/pkg/route" + "github.com/topfreegames/pitaya/v3/pkg/tracing" ) var app pitaya.Pitaya diff --git a/examples/demo/cluster/services/connector.go b/examples/demo/cluster/services/connector.go index c4c265f1..fa50f638 100644 --- a/examples/demo/cluster/services/connector.go +++ b/examples/demo/cluster/services/connector.go @@ -5,10 +5,10 @@ import ( "encoding/json" "fmt" - "github.com/topfreegames/pitaya/v2" - "github.com/topfreegames/pitaya/v2/component" - "github.com/topfreegames/pitaya/v2/examples/demo/protos" - pitayaprotos "github.com/topfreegames/pitaya/v2/protos" + "github.com/topfreegames/pitaya/v3/examples/demo/protos" + pitaya "github.com/topfreegames/pitaya/v3/pkg" + "github.com/topfreegames/pitaya/v3/pkg/component" + pitayaprotos "github.com/topfreegames/pitaya/v3/pkg/protos" ) // ConnectorRemote is a remote that will receive rpc's diff --git a/examples/demo/cluster/services/room.go b/examples/demo/cluster/services/room.go index 076292f2..cd5c2ec0 100644 --- a/examples/demo/cluster/services/room.go +++ b/examples/demo/cluster/services/room.go @@ -6,10 +6,10 @@ import ( "time" "github.com/google/uuid" - "github.com/topfreegames/pitaya/v2" - "github.com/topfreegames/pitaya/v2/component" - "github.com/topfreegames/pitaya/v2/examples/demo/protos" - "github.com/topfreegames/pitaya/v2/timer" + "github.com/topfreegames/pitaya/v3/examples/demo/protos" + pitaya "github.com/topfreegames/pitaya/v3/pkg" + "github.com/topfreegames/pitaya/v3/pkg/component" + "github.com/topfreegames/pitaya/v3/pkg/timer" ) type ( diff --git a/examples/demo/cluster_grpc/main.go b/examples/demo/cluster_grpc/main.go index 9628a9fd..767fdaff 100644 --- a/examples/demo/cluster_grpc/main.go +++ b/examples/demo/cluster_grpc/main.go @@ -8,16 +8,16 @@ import ( "strings" - "github.com/topfreegames/pitaya/v2" - "github.com/topfreegames/pitaya/v2/acceptor" - "github.com/topfreegames/pitaya/v2/cluster" - "github.com/topfreegames/pitaya/v2/component" - "github.com/topfreegames/pitaya/v2/config" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/examples/demo/cluster_grpc/services" - "github.com/topfreegames/pitaya/v2/groups" - "github.com/topfreegames/pitaya/v2/modules" - "github.com/topfreegames/pitaya/v2/route" + "github.com/topfreegames/pitaya/v3/examples/demo/cluster_grpc/services" + pitaya "github.com/topfreegames/pitaya/v3/pkg" + "github.com/topfreegames/pitaya/v3/pkg/acceptor" + "github.com/topfreegames/pitaya/v3/pkg/cluster" + "github.com/topfreegames/pitaya/v3/pkg/component" + "github.com/topfreegames/pitaya/v3/pkg/config" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/groups" + "github.com/topfreegames/pitaya/v3/pkg/modules" + "github.com/topfreegames/pitaya/v3/pkg/route" ) var app pitaya.Pitaya diff --git a/examples/demo/cluster_grpc/services/connector.go b/examples/demo/cluster_grpc/services/connector.go index 0c48b030..c0497cf4 100644 --- a/examples/demo/cluster_grpc/services/connector.go +++ b/examples/demo/cluster_grpc/services/connector.go @@ -4,9 +4,9 @@ import ( "context" "fmt" - "github.com/topfreegames/pitaya/v2" - "github.com/topfreegames/pitaya/v2/component" - "github.com/topfreegames/pitaya/v2/examples/demo/protos" + "github.com/topfreegames/pitaya/v3/examples/demo/protos" + pitaya "github.com/topfreegames/pitaya/v3/pkg" + "github.com/topfreegames/pitaya/v3/pkg/component" ) // ConnectorRemote is a remote that will receive rpc's diff --git a/examples/demo/cluster_grpc/services/room.go b/examples/demo/cluster_grpc/services/room.go index cc628077..77a70d43 100644 --- a/examples/demo/cluster_grpc/services/room.go +++ b/examples/demo/cluster_grpc/services/room.go @@ -7,10 +7,10 @@ import ( "strconv" "time" - "github.com/topfreegames/pitaya/v2" - "github.com/topfreegames/pitaya/v2/component" - "github.com/topfreegames/pitaya/v2/examples/demo/protos" - "github.com/topfreegames/pitaya/v2/timer" + "github.com/topfreegames/pitaya/v3/examples/demo/protos" + pitaya "github.com/topfreegames/pitaya/v3/pkg" + "github.com/topfreegames/pitaya/v3/pkg/component" + "github.com/topfreegames/pitaya/v3/pkg/timer" ) type ( diff --git a/examples/demo/custom_metrics/main.go b/examples/demo/custom_metrics/main.go index 3b4013d8..66abc74c 100644 --- a/examples/demo/custom_metrics/main.go +++ b/examples/demo/custom_metrics/main.go @@ -6,11 +6,11 @@ import ( "strings" "github.com/spf13/viper" - "github.com/topfreegames/pitaya/v2" - "github.com/topfreegames/pitaya/v2/acceptor" - "github.com/topfreegames/pitaya/v2/component" - "github.com/topfreegames/pitaya/v2/config" - "github.com/topfreegames/pitaya/v2/examples/demo/custom_metrics/services" + "github.com/topfreegames/pitaya/v3/examples/demo/custom_metrics/services" + pitaya "github.com/topfreegames/pitaya/v3/pkg" + "github.com/topfreegames/pitaya/v3/pkg/acceptor" + "github.com/topfreegames/pitaya/v3/pkg/component" + "github.com/topfreegames/pitaya/v3/pkg/config" ) var app pitaya.Pitaya diff --git a/examples/demo/custom_metrics/services/room.go b/examples/demo/custom_metrics/services/room.go index e7d58836..76d7ffb6 100644 --- a/examples/demo/custom_metrics/services/room.go +++ b/examples/demo/custom_metrics/services/room.go @@ -3,9 +3,9 @@ package services import ( "context" - "github.com/topfreegames/pitaya/v2" - "github.com/topfreegames/pitaya/v2/component" - "github.com/topfreegames/pitaya/v2/examples/demo/custom_metrics/messages" + "github.com/topfreegames/pitaya/v3/examples/demo/custom_metrics/messages" + pitaya "github.com/topfreegames/pitaya/v3/pkg" + "github.com/topfreegames/pitaya/v3/pkg/component" ) // Room server diff --git a/examples/demo/pipeline/main.go b/examples/demo/pipeline/main.go index 1505f6dc..b4d5e7fa 100644 --- a/examples/demo/pipeline/main.go +++ b/examples/demo/pipeline/main.go @@ -5,10 +5,10 @@ import ( "flag" "fmt" - "github.com/topfreegames/pitaya/v2" - "github.com/topfreegames/pitaya/v2/acceptor" - "github.com/topfreegames/pitaya/v2/component" - "github.com/topfreegames/pitaya/v2/config" + "github.com/topfreegames/pitaya/v3/pkg" + "github.com/topfreegames/pitaya/v3/pkg/acceptor" + "github.com/topfreegames/pitaya/v3/pkg/component" + "github.com/topfreegames/pitaya/v3/pkg/config" ) // MetagameServer ... diff --git a/examples/demo/rate_limiting/main.go b/examples/demo/rate_limiting/main.go index d48bb2a8..c3e1f291 100644 --- a/examples/demo/rate_limiting/main.go +++ b/examples/demo/rate_limiting/main.go @@ -7,13 +7,13 @@ import ( "time" "github.com/spf13/viper" - "github.com/topfreegames/pitaya/v2" - "github.com/topfreegames/pitaya/v2/acceptor" - "github.com/topfreegames/pitaya/v2/acceptorwrapper" - "github.com/topfreegames/pitaya/v2/component" - "github.com/topfreegames/pitaya/v2/config" - "github.com/topfreegames/pitaya/v2/examples/demo/rate_limiting/services" - "github.com/topfreegames/pitaya/v2/metrics" + "github.com/topfreegames/pitaya/v3/examples/demo/rate_limiting/services" + pitaya "github.com/topfreegames/pitaya/v3/pkg" + "github.com/topfreegames/pitaya/v3/pkg/acceptor" + "github.com/topfreegames/pitaya/v3/pkg/acceptorwrapper" + "github.com/topfreegames/pitaya/v3/pkg/component" + "github.com/topfreegames/pitaya/v3/pkg/config" + "github.com/topfreegames/pitaya/v3/pkg/metrics" ) func createAcceptor(port int, reporters []metrics.Reporter) acceptor.Acceptor { diff --git a/examples/demo/rate_limiting/services/room.go b/examples/demo/rate_limiting/services/room.go index 20b23076..e2713e4d 100644 --- a/examples/demo/rate_limiting/services/room.go +++ b/examples/demo/rate_limiting/services/room.go @@ -3,7 +3,7 @@ package services import ( "context" - "github.com/topfreegames/pitaya/v2/component" + "github.com/topfreegames/pitaya/v3/pkg/component" ) // Room represents a component that contains a bundle of room related handler diff --git a/examples/demo/worker/main.go b/examples/demo/worker/main.go index 165ce21f..e9285721 100644 --- a/examples/demo/worker/main.go +++ b/examples/demo/worker/main.go @@ -7,11 +7,11 @@ import ( "strings" "github.com/spf13/viper" - "github.com/topfreegames/pitaya/v2" - "github.com/topfreegames/pitaya/v2/acceptor" - "github.com/topfreegames/pitaya/v2/component" - "github.com/topfreegames/pitaya/v2/config" - "github.com/topfreegames/pitaya/v2/examples/demo/worker/services" + "github.com/topfreegames/pitaya/v3/examples/demo/worker/services" + pitaya "github.com/topfreegames/pitaya/v3/pkg" + "github.com/topfreegames/pitaya/v3/pkg/acceptor" + "github.com/topfreegames/pitaya/v3/pkg/component" + "github.com/topfreegames/pitaya/v3/pkg/config" ) var app pitaya.Pitaya diff --git a/examples/demo/worker/services/metagame.go b/examples/demo/worker/services/metagame.go index 413f0b9d..7a8a659b 100644 --- a/examples/demo/worker/services/metagame.go +++ b/examples/demo/worker/services/metagame.go @@ -3,9 +3,9 @@ package services import ( "context" - "github.com/topfreegames/pitaya/v2/component" - "github.com/topfreegames/pitaya/v2/examples/demo/worker/protos" - "github.com/topfreegames/pitaya/v2/logger" + "github.com/topfreegames/pitaya/v3/examples/demo/worker/protos" + "github.com/topfreegames/pitaya/v3/pkg/component" + "github.com/topfreegames/pitaya/v3/pkg/logger" ) // Metagame server diff --git a/examples/demo/worker/services/room.go b/examples/demo/worker/services/room.go index 227619b8..d4fa8277 100644 --- a/examples/demo/worker/services/room.go +++ b/examples/demo/worker/services/room.go @@ -3,10 +3,10 @@ package services import ( "context" - "github.com/topfreegames/pitaya/v2" - "github.com/topfreegames/pitaya/v2/component" - "github.com/topfreegames/pitaya/v2/examples/demo/worker/protos" - "github.com/topfreegames/pitaya/v2/logger" + "github.com/topfreegames/pitaya/v3/examples/demo/worker/protos" + pitaya "github.com/topfreegames/pitaya/v3/pkg" + "github.com/topfreegames/pitaya/v3/pkg/component" + "github.com/topfreegames/pitaya/v3/pkg/logger" ) // Room server diff --git a/examples/demo/worker/services/worker.go b/examples/demo/worker/services/worker.go index 01bca358..b8669629 100644 --- a/examples/demo/worker/services/worker.go +++ b/examples/demo/worker/services/worker.go @@ -4,9 +4,9 @@ import ( "context" "github.com/golang/protobuf/proto" - "github.com/topfreegames/pitaya/v2" - "github.com/topfreegames/pitaya/v2/component" - "github.com/topfreegames/pitaya/v2/examples/demo/worker/protos" + "github.com/topfreegames/pitaya/v3/examples/demo/worker/protos" + pitaya "github.com/topfreegames/pitaya/v3/pkg" + "github.com/topfreegames/pitaya/v3/pkg/component" ) // Worker server diff --git a/examples/testing/main.go b/examples/testing/main.go index 1814415c..e8862fdc 100644 --- a/examples/testing/main.go +++ b/examples/testing/main.go @@ -30,20 +30,20 @@ import ( "github.com/google/uuid" "github.com/sirupsen/logrus" "github.com/spf13/viper" - "github.com/topfreegames/pitaya/v2" - "github.com/topfreegames/pitaya/v2/acceptor" - "github.com/topfreegames/pitaya/v2/cluster" - "github.com/topfreegames/pitaya/v2/component" - "github.com/topfreegames/pitaya/v2/config" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/examples/testing/protos" - "github.com/topfreegames/pitaya/v2/groups" - logruswrapper "github.com/topfreegames/pitaya/v2/logger/logrus" - "github.com/topfreegames/pitaya/v2/modules" - "github.com/topfreegames/pitaya/v2/protos/test" - "github.com/topfreegames/pitaya/v2/serialize/json" - "github.com/topfreegames/pitaya/v2/serialize/protobuf" - "github.com/topfreegames/pitaya/v2/session" + "github.com/topfreegames/pitaya/v3/examples/testing/protos" + pitaya "github.com/topfreegames/pitaya/v3/pkg" + "github.com/topfreegames/pitaya/v3/pkg/acceptor" + "github.com/topfreegames/pitaya/v3/pkg/cluster" + "github.com/topfreegames/pitaya/v3/pkg/component" + "github.com/topfreegames/pitaya/v3/pkg/config" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/groups" + logruswrapper "github.com/topfreegames/pitaya/v3/pkg/logger/logrus" + "github.com/topfreegames/pitaya/v3/pkg/modules" + "github.com/topfreegames/pitaya/v3/pkg/protos/test" + "github.com/topfreegames/pitaya/v3/pkg/serialize/json" + "github.com/topfreegames/pitaya/v3/pkg/serialize/protobuf" + "github.com/topfreegames/pitaya/v3/pkg/session" ) // TestSvc service for e2e tests diff --git a/go.mod b/go.mod index c3e4de37..00af2bd5 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/topfreegames/pitaya/v2 +module github.com/topfreegames/pitaya/v3 go 1.22 @@ -31,13 +31,15 @@ require ( go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 go.opentelemetry.io/otel/sdk v1.28.0 go.opentelemetry.io/otel/trace v1.28.0 - golang.org/x/net v0.26.0 + golang.org/x/net v0.27.0 google.golang.org/grpc v1.64.0 google.golang.org/protobuf v1.34.2 ) require ( github.com/Microsoft/go-winio v0.6.1 // indirect + github.com/abiosoft/ishell/v2 v2.0.2 // indirect + github.com/abiosoft/readline v0.0.0-20180607040430-155bce2042db // indirect github.com/benbjohnson/clock v1.1.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bitly/go-simplejson v0.5.1 // indirect @@ -46,8 +48,11 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/coreos/go-semver v0.3.1 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dustin/go-humanize v1.0.1 // indirect + github.com/fatih/color v1.13.0 // indirect + github.com/flynn-archive/go-shlex v0.0.0-20150515145356-3f9db97f8568 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -66,10 +71,15 @@ require ( github.com/jonboulle/clockwork v0.2.2 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/compress v1.16.6 // indirect + github.com/ksubedi/gomove v0.0.0-20200106182546-e1fa47256217 // indirect github.com/leodido/go-urn v1.2.4 // indirect github.com/magiconair/properties v1.8.7 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect github.com/minio/highwayhash v1.0.2 // indirect + github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/nats-io/jwt/v2 v2.2.1-0.20220330180145-442af02fd36a // indirect @@ -80,6 +90,8 @@ require ( github.com/prometheus/client_model v0.4.0 // indirect github.com/prometheus/common v0.43.0 // indirect github.com/prometheus/procfs v0.10.1 // indirect + github.com/russross/blackfriday/v2 v2.1.0 // indirect + github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect github.com/soheilhy/cmux v0.1.5 // indirect github.com/spf13/afero v1.9.5 // indirect github.com/spf13/cast v1.5.1 // indirect @@ -87,6 +99,7 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/subosito/gotenv v1.4.2 // indirect github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 // indirect + github.com/urfave/cli v1.22.15 // indirect github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect go.etcd.io/bbolt v1.3.8 // indirect go.etcd.io/etcd/client/v2 v2.305.11 // indirect @@ -99,13 +112,13 @@ require ( go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.24.0 // indirect - golang.org/x/crypto v0.24.0 // indirect - golang.org/x/mod v0.17.0 // indirect + golang.org/x/crypto v0.25.0 // indirect + golang.org/x/mod v0.19.0 // indirect golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.21.0 // indirect + golang.org/x/sys v0.22.0 // indirect golang.org/x/text v0.16.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect + golang.org/x/tools v0.23.0 // indirect google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect diff --git a/go.sum b/go.sum index 36491f0e..204bffb1 100644 --- a/go.sum +++ b/go.sum @@ -43,11 +43,16 @@ cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3f dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DataDog/datadog-go v4.8.3+incompatible h1:fNGaYSuObuQb5nzeTQqowRAd9bpDIRRV4/gUtIBjh8Q= github.com/DataDog/datadog-go v4.8.3+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/abiosoft/ishell/v2 v2.0.2 h1:5qVfGiQISaYM8TkbBl7RFO6MddABoXpATrsFbVI+SNo= +github.com/abiosoft/ishell/v2 v2.0.2/go.mod h1:E4oTCXfo6QjoCart0QYa5m9w4S+deXs/P/9jA77A9Bs= +github.com/abiosoft/readline v0.0.0-20180607040430-155bce2042db h1:CjPUSXOiYptLbTdr1RceuZgSFDQ7U15ITERUGrUORx8= +github.com/abiosoft/readline v0.0.0-20180607040430-155bce2042db/go.mod h1:rB3B4rKii8V21ydCbIzH5hZiCQE7f5E9SzUb/ZZx530= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -77,6 +82,9 @@ github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/customerio/gospec v0.0.0-20130710230057-a5cc0e48aa39 h1:O0YTztXI3XeJXlFhSo4wNb0VBVqSgT+hi/CjNWKvMnY= github.com/customerio/gospec v0.0.0-20130710230057-a5cc0e48aa39/go.mod h1:OzYUFhPuL2JbjwFwrv6CZs23uBawekc6OZs+g19F0mY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -92,7 +100,12 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= +github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/flynn-archive/go-shlex v0.0.0-20150515145356-3f9db97f8568 h1:BMXYYRWTLOJKlh+lOBt6nUQgXAfB7oVIQt5cNreqSLI= +github.com/flynn-archive/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:rZfgFAXFS/z/lEd6LJmf9HVZ1LkgYiHx5pHhV5DR16M= github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= @@ -234,16 +247,34 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/ksubedi/gomove v0.0.0-20200106182546-e1fa47256217 h1:CYk3GRunz2nSWbGNXpDxlr5uU/YTkBf1p9zorauMvvc= +github.com/ksubedi/gomove v0.0.0-20200106182546-e1fa47256217/go.mod h1:yq7Mn2Ip7t9irYr+JskEuBYdF3tKnikTKG49Qn5aDuY= github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/mailgun/proxyproto v1.0.0 h1:CZTX/NM0qSq2JSatnowAhXmsHCXVu9JY6CDouOxJIQ4= github.com/mailgun/proxyproto v1.0.0/go.mod h1:4r+sqMZLJWs8HRnFYcpYH/Cb+P2QGAQt+bV76JJkS4I= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= +github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d h1:5PJl274Y63IEHC+7izoQE9x6ikvDFZS2mDVS3drnohI= +github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -288,6 +319,11 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= @@ -321,6 +357,7 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= @@ -330,6 +367,9 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 h1:uruHq4 github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/topfreegames/go-workers v1.2.1 h1:Jkkir3NngId7XHBP8JxcrqFDR22gLmfzaZlJO0IgCzU= github.com/topfreegames/go-workers v1.2.1/go.mod h1:Ayopyg9jGJyQ0nEXH8W7iBBBV6rLxwwMKFAdwCD1TSs= +github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/urfave/cli v1.22.15 h1:nuqt+pdC/KqswQKhETJjo7pvn/k4xMUxgW6liI7XpnM= +github.com/urfave/cli v1.22.15/go.mod h1:wSan1hmo5zeyLGBjRJbzRTNk8gwoYa2B9n4q9dmRIc0= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -399,6 +439,8 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= +golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= +golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -435,6 +477,8 @@ golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= +golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -473,6 +517,8 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= +golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -501,6 +547,7 @@ golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -515,6 +562,7 @@ golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -539,11 +587,16 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -582,6 +635,7 @@ golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191204214957-d79e56da46fe/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -614,6 +668,8 @@ golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg= +golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/go.work b/go.work index 07f1acab..b5dda70d 100644 --- a/go.work +++ b/go.work @@ -4,6 +4,5 @@ toolchain go1.22.4 use ( . - ./pitaya-cli ./xk6-pitaya ) diff --git a/go.work.sum b/go.work.sum index f47c3fe5..eb099430 100644 --- a/go.work.sum +++ b/go.work.sum @@ -488,6 +488,8 @@ github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8= github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw= github.com/lyft/protoc-gen-star/v2 v2.0.3/go.mod h1:amey7yeodaJhXSbf/TlLvWiqQfLOSpEk//mLlc+axEk= github.com/mccutchen/go-httpbin v1.1.2-0.20190116014521-c5cb2f4802fa/go.mod h1:fhpOYavp5g2K74XDl/ao2y4KvhqVtKlkg1e+0UaQv7I= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mstoykov/envconfig v1.4.1-0.20220114105314-765c6d8c76f1/go.mod h1:vk/d9jpexY2Z9Bb0uB4Ndesss1Sr0Z9ZiGUrg5o9VGk= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -509,7 +511,6 @@ github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykE github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/spf13/afero v1.10.0 h1:EaGW2JJh15aKOejeuJ+wpFSHnbd7GE6Wvp3TsNhb6LY= github.com/spf13/afero v1.10.0/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/thrawn01/args v0.3.0 h1:XbMnfGaw6nFbm8hgSncHu20cGrZMTP8BnxiusA43AeE= github.com/tidwall/gjson v1.14.4 h1:uo0p8EbA09J7RQaflQ1aBRffTR7xedD2bcIVSYxLnkM= github.com/tidwall/gjson v1.14.4/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= @@ -578,8 +579,10 @@ golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= +golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457/go.mod h1:pRgIJT+bRLFKnoM1ldnzKoxTIn14Yxz928LQRYYgIN0= golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= diff --git a/main.go b/main.go new file mode 100644 index 00000000..0fa60a28 --- /dev/null +++ b/main.go @@ -0,0 +1,23 @@ +/* +Copyright 2024 Wildlife Studios + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package main + +import "github.com/topfreegames/pitaya/v3/cmd" + +func main() { + cmd.Execute() +} diff --git a/pitaya-cli/LICENSE b/pitaya-cli/LICENSE deleted file mode 100644 index 28722ed0..00000000 --- a/pitaya-cli/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) TFG Co. All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/pitaya-cli/Makefile b/pitaya-cli/Makefile deleted file mode 100644 index 0744f83f..00000000 --- a/pitaya-cli/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -build: - @mkdir -p out - @go build -o ./out/pitaya-cli-darwin ./... - -build-linux: - @mkdir -p out - @GOOS=linux GOARCH=amd64 go build -o ./out/pitaya-cli-linux ./main.go diff --git a/pitaya-cli/README.md b/pitaya-cli/README.md deleted file mode 100644 index 5c111465..00000000 --- a/pitaya-cli/README.md +++ /dev/null @@ -1,130 +0,0 @@ -pitaya-cli -================== - -A REPL cli client made in go for pitaya. - -## Installing - -``` -go install github.com/topfreegames/pitaya/pitaya-cli/v2@latest -``` - -## Usage - -For cli flags, run `pitaya-cli --help` - -``` -$ pitaya-cli - -Pitaya REPL Client ->>> help - -Commands: - clear clear the screen - connect connects to pitaya - disconnect disconnects from pitaya server - exit exit the program - help display help - notify makes a notify to pitaya server - push insert information of push return - request makes a request to pitaya server - sethandshake sets a handshake parameter -``` - -### Protobuf -For connecting to a server that uses protobuf as serializer the server must implement two routes: -- Docs: responsible for returning all handlers and the protos used on input and - output; -- Descriptors: The list of protos descriptions, this will be used by the CLI to - encode/decode the messages. - -To implement those routes you can use some functions provided by pitaya, here is -a short example of both routes: -```go -import ( - // ... - - "github.com/topfreegames/pitaya" - "github.com/topfreegames/pitaya/protos" -) - -// Docs handler -func (c *MyHandler) Docs(ctx context.Context) (*protos.Doc, error) { - d, err := pitaya.Documentation(true) - if err != nil { - return nil, fmt.Errorf("failed to generate documentation for pitaya routes: %w", err) - } - - doc, err := json.Marshal(d) - if err != nil { - return nil, fmt.Errorf("failed to encode documentation JSON: %w", err) - } - - return &protos.Doc{Doc: string(doc)}, nil -} - -// Descriptors route -func (c *MyHandler) Descriptors(ctx context.Context, names *protos.ProtoNames) (*protos.ProtoDescriptors, error) { - descriptors := make([][]byte, len(names.Name)) - - for i, protoName := range names.Name { - desc, err := pitaya.Descriptor(protoName) - if err != nil { - return nil, fmt.Errorf("failed to get descriptor for '%s': %w", protoName, err) - } - - descriptors[i] = desc - } - - return &protos.ProtoDescriptors{Desc: descriptors}, nil -} -``` - -When initializing the CLI, you have to provide the docs route as the following: -``` -pitaya-cli -docs connector.docsHandler.docs -``` - -NOTE: The descriptors handler is automatically discovered by the client. -It must only follow the signature mentioned earlier. - -A full example of running pitaya-cli with protobuf: -``` -pitaya-cli -docs connector.docsHandler.docs ->>> push connector.playerHandler.matchfound protos.FindMatchPush ->>> connect localhost:30124 ->>> request connector.playerHandler.create ->>> request connector.playerHandler.findmatch {"RoomType":"xxxx"} -``` - -### Set handshake parameters - -You can edit handshake parameters before connecting to the server. - -You may pass the full handshake json: -``` -Pitaya REPL Client ->>> sethandshake {"sys":{"clientVersion":"1.0.6", "clientBuildNumber":"999","platform":"ios"}} -``` - -Or edit one of three specific parameters: -``` -Pitaya REPL Client ->>> sethandshake platform ios ->>> sethandshake buildNumber 999 ->>> sethandshake version 1.0.6 -``` - -### Read commands from file - -It's possible to add a list of sequential requests into a file and pitaya-cli will execute them in order. - -For example: commands.txt - -``` -connect localhost:3250 -request connector.playerHandler.create -request connector.playerHandler.findmatch {"RoomType":"xxxx"} -``` - -Then run: `pitaya-cli --filename commands.txt` diff --git a/pitaya-cli/go.mod b/pitaya-cli/go.mod deleted file mode 100644 index 1edd90e8..00000000 --- a/pitaya-cli/go.mod +++ /dev/null @@ -1,83 +0,0 @@ -module github.com/topfreegames/pitaya/pitaya-cli/v2 - -go 1.18 - -require ( - github.com/abiosoft/ishell/v2 v2.0.2 - github.com/mitchellh/go-homedir v1.1.0 - github.com/sirupsen/logrus v1.9.3 - github.com/topfreegames/pitaya/v2 v2.8.1-0.20231207120201-acb62e4fb582 -) - -require ( - github.com/DataDog/datadog-go v4.8.3+incompatible // indirect - github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/abiosoft/ishell v2.0.0+incompatible // indirect - github.com/abiosoft/readline v0.0.0-20180607040430-155bce2042db // indirect - github.com/beorn7/perks v1.0.1 // indirect - github.com/bitly/go-simplejson v0.5.0 // indirect - github.com/bufbuild/protocompile v0.4.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/chzyer/logex v1.2.0 // indirect - github.com/chzyer/test v0.0.0-20210722231415-061457976a23 // indirect - github.com/coreos/go-semver v0.3.1 // indirect - github.com/coreos/go-systemd/v22 v22.5.0 // indirect - github.com/fatih/color v1.15.0 // indirect - github.com/flynn-archive/go-shlex v0.0.0-20150515145356-3f9db97f8568 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/garyburd/redigo v1.6.4 // indirect - github.com/go-playground/locales v0.14.1 // indirect - github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.13.0 // indirect - github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/google/go-cmp v0.6.0 // indirect - github.com/google/uuid v1.3.1 // indirect - github.com/gorilla/websocket v1.5.0 // indirect - github.com/hashicorp/hcl v1.0.0 // indirect - github.com/jhump/protoreflect v1.15.1 // indirect - github.com/leodido/go-urn v1.2.4 // indirect - github.com/magiconair/properties v1.8.7 // indirect - github.com/mailgun/proxyproto v1.0.0 // indirect - github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect - github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/nats-io/nats.go v1.25.0 // indirect - github.com/nats-io/nkeys v0.4.4 // indirect - github.com/nats-io/nuid v1.0.1 // indirect - github.com/opentracing/opentracing-go v1.2.0 // indirect - github.com/pelletier/go-toml/v2 v2.0.7 // indirect - github.com/pkg/errors v0.9.1 // indirect - github.com/prometheus/client_golang v1.16.0 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.43.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect - github.com/spf13/afero v1.9.5 // indirect - github.com/spf13/cast v1.5.1 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.15.0 // indirect - github.com/subosito/gotenv v1.4.2 // indirect - github.com/topfreegames/go-workers v1.1.0 // indirect - go.etcd.io/etcd/api/v3 v3.5.11 // indirect - go.etcd.io/etcd/client/pkg/v3 v3.5.11 // indirect - go.etcd.io/etcd/client/v3 v3.5.11 // indirect - go.uber.org/atomic v1.11.0 // indirect - go.uber.org/goleak v1.3.0 // indirect - go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.24.0 // indirect - golang.org/x/crypto v0.14.0 // indirect - golang.org/x/mod v0.11.0 // indirect - golang.org/x/net v0.17.0 // indirect - golang.org/x/sys v0.14.0 // indirect - golang.org/x/text v0.13.0 // indirect - golang.org/x/tools v0.10.0 // indirect - google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect - gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect -) diff --git a/pitaya-cli/go.sum b/pitaya-cli/go.sum deleted file mode 100644 index 11b35ccf..00000000 --- a/pitaya-cli/go.sum +++ /dev/null @@ -1,698 +0,0 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DataDog/datadog-go v4.8.3+incompatible h1:fNGaYSuObuQb5nzeTQqowRAd9bpDIRRV4/gUtIBjh8Q= -github.com/DataDog/datadog-go v4.8.3+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= -github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= -github.com/abiosoft/ishell v2.0.0+incompatible h1:zpwIuEHc37EzrsIYah3cpevrIc8Oma7oZPxr03tlmmw= -github.com/abiosoft/ishell v2.0.0+incompatible/go.mod h1:HQR9AqF2R3P4XXpMpI0NAzgHf/aS6+zVXRj14cVk9qg= -github.com/abiosoft/ishell/v2 v2.0.2 h1:5qVfGiQISaYM8TkbBl7RFO6MddABoXpATrsFbVI+SNo= -github.com/abiosoft/ishell/v2 v2.0.2/go.mod h1:E4oTCXfo6QjoCart0QYa5m9w4S+deXs/P/9jA77A9Bs= -github.com/abiosoft/readline v0.0.0-20180607040430-155bce2042db h1:CjPUSXOiYptLbTdr1RceuZgSFDQ7U15ITERUGrUORx8= -github.com/abiosoft/readline v0.0.0-20180607040430-155bce2042db/go.mod h1:rB3B4rKii8V21ydCbIzH5hZiCQE7f5E9SzUb/ZZx530= -github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= -github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bitly/go-simplejson v0.5.0 h1:6IH+V8/tVMab511d5bn4M7EwGXZf9Hj6i2xSwkNEM+Y= -github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= -github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= -github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= -github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= -github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/logex v1.2.0 h1:+eqR0HfOetur4tgnC8ftU5imRnhi4te+BadWS95c5AM= -github.com/chzyer/logex v1.2.0/go.mod h1:9+9sk7u7pGNWYMkh0hdiL++6OeibzJccyQU4p4MedaY= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/chzyer/test v0.0.0-20210722231415-061457976a23 h1:dZ0/VyGgQdVGAss6Ju0dt5P0QltE0SFY5Woh6hbIfiQ= -github.com/chzyer/test v0.0.0-20210722231415-061457976a23/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= -github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= -github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= -github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/customerio/gospec v0.0.0-20130710230057-a5cc0e48aa39 h1:O0YTztXI3XeJXlFhSo4wNb0VBVqSgT+hi/CjNWKvMnY= -github.com/customerio/gospec v0.0.0-20130710230057-a5cc0e48aa39/go.mod h1:OzYUFhPuL2JbjwFwrv6CZs23uBawekc6OZs+g19F0mY= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= -github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= -github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/flynn-archive/go-shlex v0.0.0-20150515145356-3f9db97f8568 h1:BMXYYRWTLOJKlh+lOBt6nUQgXAfB7oVIQt5cNreqSLI= -github.com/flynn-archive/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:rZfgFAXFS/z/lEd6LJmf9HVZ1LkgYiHx5pHhV5DR16M= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/garyburd/redigo v1.6.4 h1:LFu2R3+ZOPgSMWMOL+saa/zXRjw0ID2G8FepO53BGlg= -github.com/garyburd/redigo v1.6.4/go.mod h1:rTb6epsqigu3kYKBnaF028A7Tf/Aw5s0cqA47doKKqw= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-ini/ini v1.55.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= -github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= -github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= -github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= -github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= -github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.13.0 h1:cFRQdfaSMCOSfGCCLB20MHvuoHb/s5G8L5pu2ppK5AQ= -github.com/go-playground/validator/v10 v10.13.0/go.mod h1:dwu7+CG8/CtBiJFZDz4e+5Upb6OLw04gtBYw0mcG/z4= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.4.2 h1:rcc4lwaZgFMCZ5jxF9ABolDcIHdBytAFgqFPbSJQAYs= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= -github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= -github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= -github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= -github.com/jonboulle/clockwork v0.2.2 h1:UOGuzwb1PwsrDAObMuhUnj0p5ULPj8V/xJ7Kx9qUBdQ= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.16.6 h1:91SKEy4K37vkp255cJ8QesJhjyRO0hn9i9G0GoUwLsk= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= -github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= -github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= -github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= -github.com/mailgun/proxyproto v1.0.0 h1:CZTX/NM0qSq2JSatnowAhXmsHCXVu9JY6CDouOxJIQ4= -github.com/mailgun/proxyproto v1.0.0/go.mod h1:4r+sqMZLJWs8HRnFYcpYH/Cb+P2QGAQt+bV76JJkS4I= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= -github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= -github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/nats-io/jwt/v2 v2.2.1-0.20220330180145-442af02fd36a h1:lem6QCvxR0Y28gth9P+wV2K/zYUUAkJ+55U8cpS0p5I= -github.com/nats-io/nats-server/v2 v2.8.4 h1:0jQzze1T9mECg8YZEl8+WYUXb9JKluJfCBriPUtluB4= -github.com/nats-io/nats.go v1.25.0 h1:t5/wCPGciR7X3Mu8QOi4jiJaXaWM8qtkLu4lzGZvYHE= -github.com/nats-io/nats.go v1.25.0/go.mod h1:D2WALIhz7V8M0pH8Scx8JZXlg6Oqz5VG+nQkK8nJdvg= -github.com/nats-io/nkeys v0.4.4 h1:xvBJ8d69TznjcQl9t6//Q5xXuVhyYiSos6RPtvQNTwA= -github.com/nats-io/nkeys v0.4.4/go.mod h1:XUkxdLPTufzlihbamfzQ7mw/VGx6ObUs+0bN5sNvt64= -github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= -github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= -github.com/orfjackal/nanospec.go v0.0.0-20120727230329-de4694c1d701/go.mod h1:VtBIF1XX0c1nKkeAPk8i4aXkYopqQgfDqolHUIHPwNI= -github.com/pelletier/go-toml/v2 v2.0.7 h1:muncTPStnKRos5dpVKULv2FVd4bMOhNePj9CjgDb8Us= -github.com/pelletier/go-toml/v2 v2.0.7/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= -github.com/prometheus/common v0.43.0 h1:iq+BVjvYLei5f27wiuNiB1DN6DYQkp1c8Bx0Vykh5us= -github.com/prometheus/common v0.43.0/go.mod h1:NCvr5cQIh3Y/gy73/RdVtC9r8xxrxwJnB+2lB3BxrFc= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= -github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= -github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= -github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= -github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= -github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= -github.com/thrawn01/args v0.3.0/go.mod h1:TnRiOFjyh7Wa6oC8ACFPc7KIvbzCiluphA3mJUiPIEo= -github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 h1:uruHq4dN7GR16kFc5fp3d1RIYzJW5onx8Ybykw2YQFA= -github.com/topfreegames/go-workers v1.1.0 h1:gLJHsTeNxx2K3lNyDD4lC4XpPF+0u0TYuWcp76Eqccg= -github.com/topfreegames/go-workers v1.1.0/go.mod h1:8D8gh2G+q1i9rq92d6QRGyQcWlzPKV+O86WG8UxAPIg= -github.com/topfreegames/pitaya/v2 v2.8.1-0.20231207120201-acb62e4fb582 h1:O+aPGS5p5R5Oucr7be4K8Yr0U1E63TJsLsb/M+XIeEI= -github.com/topfreegames/pitaya/v2 v2.8.1-0.20231207120201-acb62e4fb582/go.mod h1:vvVG2nTqazeTyOexa4pD1AOLT2kbHJGVOa6N/Q3YUg0= -github.com/uber/jaeger-client-go v2.25.0+incompatible h1:IxcNZ7WRY1Y3G4poYlx24szfsn/3LvK9QHCq9oQw8+U= -github.com/uber/jaeger-lib v2.4.0+incompatible h1:fY7QsGQWiCt8pajv4r7JEvmATdCVaWxXbjwyYwsNaLQ= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= -go.etcd.io/etcd/api/v3 v3.5.11 h1:B54KwXbWDHyD3XYAwprxNzTe7vlhR69LuBgZnMVvS7E= -go.etcd.io/etcd/api/v3 v3.5.11/go.mod h1:Ot+o0SWSyT6uHhA56al1oCED0JImsRiU9Dc26+C2a+4= -go.etcd.io/etcd/client/pkg/v3 v3.5.11 h1:bT2xVspdiCj2910T0V+/KHcVKjkUrCZVtk8J2JF2z1A= -go.etcd.io/etcd/client/pkg/v3 v3.5.11/go.mod h1:seTzl2d9APP8R5Y2hFL3NVlD6qC/dOT+3kvrqPyTas4= -go.etcd.io/etcd/client/v2 v2.305.11 h1:ZqdKLNJnWpE3bUaaj3XZ5xWyCi+7Vspgk9E0hlIBguE= -go.etcd.io/etcd/client/v3 v3.5.11 h1:ajWtgoNSZJ1gmS8k+icvPtqsqEav+iUorF7b0qozgUU= -go.etcd.io/etcd/client/v3 v3.5.11/go.mod h1:a6xQUEqFJ8vztO1agJh/KQKOMfFI8og52ZconzcDJwE= -go.etcd.io/etcd/pkg/v3 v3.5.11 h1:U5+/mZh+jps8VRWv7+xPiK1tC1hRBOBYdn7zCqtWyOY= -go.etcd.io/etcd/raft/v3 v3.5.11 h1:eeimaNIT9DjV4bdLSy4FjLQ/KGSAiG1L5T1nTf5VoZg= -go.etcd.io/etcd/server/v3 v3.5.11 h1:FEa0ImvoXdIPa81/vZUKpnJ74fpQ5ZivseoIKMPzfpg= -go.etcd.io/etcd/tests/v3 v3.5.11 h1:2DsRhrCNmlkPtk+zYovCLuEQlLi0hYNRq1bHW11/VFs= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 h1:PzIubN4/sjByhDRHLviCjJuweBXWFZWhghjg7cS28+M= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 h1:DeFD0VgTZ+Cj6hxravYYZE2W4GlneVH81iAOPjZkzk8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 h1:gvmNvqrPYovvyRmCSygkUDyL8lC5Tl845MLEwqpxhEU= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= -go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= -go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= -go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= -go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= -go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= -go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU= -golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200320220750-118fecf932d8/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.10.0 h1:tvDr/iQoUqNdohiYm0LmmKcBk+q86lb9EprIUFhHHGg= -golang.org/x/tools v0.10.0/go.mod h1:UJwyiVBsOA2uwvK/e5OY3GTpDUJriEd+/YlqAwLPmyM= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d h1:VBu5YqKPv6XiJ199exd8Br+Aetz+o08F+PLMnwJQHAY= -google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= -google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d h1:DoPTO70H+bcDXcd39vOqb2viZxgqeBeSGtZ55yZU4/Q= -google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/ini.v1 v1.55.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= -gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= diff --git a/acceptor/acceptor.go b/pkg/acceptor/acceptor.go similarity index 100% rename from acceptor/acceptor.go rename to pkg/acceptor/acceptor.go diff --git a/acceptor/fixtures/server.crt b/pkg/acceptor/fixtures/server.crt similarity index 100% rename from acceptor/fixtures/server.crt rename to pkg/acceptor/fixtures/server.crt diff --git a/acceptor/fixtures/server.key b/pkg/acceptor/fixtures/server.key similarity index 100% rename from acceptor/fixtures/server.key rename to pkg/acceptor/fixtures/server.key diff --git a/acceptor/proxyprotowrapper.go b/pkg/acceptor/proxyprotowrapper.go similarity index 97% rename from acceptor/proxyprotowrapper.go rename to pkg/acceptor/proxyprotowrapper.go index f5e531da..2f36f33b 100644 --- a/acceptor/proxyprotowrapper.go +++ b/pkg/acceptor/proxyprotowrapper.go @@ -5,7 +5,7 @@ import ( "sync" "github.com/mailgun/proxyproto" - "github.com/topfreegames/pitaya/v2/logger" + "github.com/topfreegames/pitaya/v3/pkg/logger" ) // Listener is used to wrap an underlying listener, diff --git a/acceptor/tcp_acceptor.go b/pkg/acceptor/tcp_acceptor.go similarity index 97% rename from acceptor/tcp_acceptor.go rename to pkg/acceptor/tcp_acceptor.go index db33e721..fbafd377 100644 --- a/acceptor/tcp_acceptor.go +++ b/pkg/acceptor/tcp_acceptor.go @@ -26,9 +26,9 @@ import ( "io" "net" - "github.com/topfreegames/pitaya/v2/conn/codec" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/logger" + "github.com/topfreegames/pitaya/v3/pkg/conn/codec" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/logger" ) // TCPAcceptor struct diff --git a/acceptor/tcp_acceptor_test.go b/pkg/acceptor/tcp_acceptor_test.go similarity index 98% rename from acceptor/tcp_acceptor_test.go rename to pkg/acceptor/tcp_acceptor_test.go index 66c6f06a..0376d739 100644 --- a/acceptor/tcp_acceptor_test.go +++ b/pkg/acceptor/tcp_acceptor_test.go @@ -27,9 +27,9 @@ import ( "time" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/conn/packet" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/helpers" + "github.com/topfreegames/pitaya/v3/pkg/conn/packet" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/helpers" ) var tcpAcceptorTables = []struct { diff --git a/acceptor/ws_acceptor.go b/pkg/acceptor/ws_acceptor.go similarity index 97% rename from acceptor/ws_acceptor.go rename to pkg/acceptor/ws_acceptor.go index 0eb5915c..847b4fa3 100644 --- a/acceptor/ws_acceptor.go +++ b/pkg/acceptor/ws_acceptor.go @@ -28,10 +28,10 @@ import ( "time" "github.com/gorilla/websocket" - "github.com/topfreegames/pitaya/v2/conn/codec" - "github.com/topfreegames/pitaya/v2/conn/packet" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/logger" + "github.com/topfreegames/pitaya/v3/pkg/conn/codec" + "github.com/topfreegames/pitaya/v3/pkg/conn/packet" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/logger" ) // WSAcceptor struct diff --git a/acceptor/ws_acceptor_test.go b/pkg/acceptor/ws_acceptor_test.go similarity index 98% rename from acceptor/ws_acceptor_test.go rename to pkg/acceptor/ws_acceptor_test.go index bbc5b0bc..9b4c30b8 100644 --- a/acceptor/ws_acceptor_test.go +++ b/pkg/acceptor/ws_acceptor_test.go @@ -8,9 +8,9 @@ import ( "github.com/gorilla/websocket" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/conn/packet" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/helpers" + "github.com/topfreegames/pitaya/v3/pkg/conn/packet" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/helpers" ) var wsAcceptorTables = []struct { diff --git a/acceptorwrapper/base.go b/pkg/acceptorwrapper/base.go similarity index 97% rename from acceptorwrapper/base.go rename to pkg/acceptorwrapper/base.go index e9a48b81..dc866405 100644 --- a/acceptorwrapper/base.go +++ b/pkg/acceptorwrapper/base.go @@ -21,7 +21,7 @@ package acceptorwrapper import ( - "github.com/topfreegames/pitaya/v2/acceptor" + "github.com/topfreegames/pitaya/v3/pkg/acceptor" ) // BaseWrapper implements Wrapper by saving the acceptor as an attribute. diff --git a/acceptorwrapper/base_test.go b/pkg/acceptorwrapper/base_test.go similarity index 95% rename from acceptorwrapper/base_test.go rename to pkg/acceptorwrapper/base_test.go index 3feeea49..17b4295d 100644 --- a/acceptorwrapper/base_test.go +++ b/pkg/acceptorwrapper/base_test.go @@ -23,11 +23,11 @@ package acceptorwrapper import ( "testing" - "github.com/topfreegames/pitaya/v2/acceptor" + "github.com/topfreegames/pitaya/v3/pkg/acceptor" "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/mocks" + "github.com/topfreegames/pitaya/v3/pkg/mocks" ) func TestListenAndServe(t *testing.T) { diff --git a/acceptorwrapper/rate_limiter.go b/pkg/acceptorwrapper/rate_limiter.go similarity index 94% rename from acceptorwrapper/rate_limiter.go rename to pkg/acceptorwrapper/rate_limiter.go index 217ef7ae..57e479cd 100644 --- a/acceptorwrapper/rate_limiter.go +++ b/pkg/acceptorwrapper/rate_limiter.go @@ -24,10 +24,10 @@ import ( "container/list" "time" - "github.com/topfreegames/pitaya/v2/acceptor" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/logger" - "github.com/topfreegames/pitaya/v2/metrics" + "github.com/topfreegames/pitaya/v3/pkg/acceptor" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/logger" + "github.com/topfreegames/pitaya/v3/pkg/metrics" ) // RateLimiter wraps net.Conn by applying rate limiting and return empty diff --git a/acceptorwrapper/rate_limiter_test.go b/pkg/acceptorwrapper/rate_limiter_test.go similarity index 97% rename from acceptorwrapper/rate_limiter_test.go rename to pkg/acceptorwrapper/rate_limiter_test.go index a59f09d2..871c859c 100644 --- a/acceptorwrapper/rate_limiter_test.go +++ b/pkg/acceptorwrapper/rate_limiter_test.go @@ -27,8 +27,8 @@ import ( "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/metrics" - "github.com/topfreegames/pitaya/v2/mocks" + "github.com/topfreegames/pitaya/v3/pkg/metrics" + "github.com/topfreegames/pitaya/v3/pkg/mocks" ) func TestRateLimiterGetNextMessage(t *testing.T) { diff --git a/acceptorwrapper/rate_limiting_wrapper.go b/pkg/acceptorwrapper/rate_limiting_wrapper.go similarity index 92% rename from acceptorwrapper/rate_limiting_wrapper.go rename to pkg/acceptorwrapper/rate_limiting_wrapper.go index 3c00b257..c69031a1 100644 --- a/acceptorwrapper/rate_limiting_wrapper.go +++ b/pkg/acceptorwrapper/rate_limiting_wrapper.go @@ -21,9 +21,9 @@ package acceptorwrapper import ( - "github.com/topfreegames/pitaya/v2/acceptor" - "github.com/topfreegames/pitaya/v2/config" - "github.com/topfreegames/pitaya/v2/metrics" + "github.com/topfreegames/pitaya/v3/pkg/acceptor" + "github.com/topfreegames/pitaya/v3/pkg/config" + "github.com/topfreegames/pitaya/v3/pkg/metrics" ) // RateLimitingWrapper rate limits for each connection diff --git a/acceptorwrapper/rate_limiting_wrapper_test.go b/pkg/acceptorwrapper/rate_limiting_wrapper_test.go similarity index 94% rename from acceptorwrapper/rate_limiting_wrapper_test.go rename to pkg/acceptorwrapper/rate_limiting_wrapper_test.go index e3a3d021..8766ba61 100644 --- a/acceptorwrapper/rate_limiting_wrapper_test.go +++ b/pkg/acceptorwrapper/rate_limiting_wrapper_test.go @@ -25,8 +25,8 @@ import ( "time" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/config" - "github.com/topfreegames/pitaya/v2/metrics" + "github.com/topfreegames/pitaya/v3/pkg/config" + "github.com/topfreegames/pitaya/v3/pkg/metrics" ) func TestNewRateLimitingWrapper(t *testing.T) { diff --git a/acceptorwrapper/wrapper.go b/pkg/acceptorwrapper/wrapper.go similarity index 97% rename from acceptorwrapper/wrapper.go rename to pkg/acceptorwrapper/wrapper.go index 54faa99b..8ec1aa46 100644 --- a/acceptorwrapper/wrapper.go +++ b/pkg/acceptorwrapper/wrapper.go @@ -21,7 +21,7 @@ package acceptorwrapper import ( - "github.com/topfreegames/pitaya/v2/acceptor" + "github.com/topfreegames/pitaya/v3/pkg/acceptor" ) // Wrapper has a method that receives an acceptor and the struct diff --git a/agent/agent.go b/pkg/agent/agent.go similarity index 96% rename from agent/agent.go rename to pkg/agent/agent.go index e9ba7e9a..09a5c2de 100644 --- a/agent/agent.go +++ b/pkg/agent/agent.go @@ -31,19 +31,19 @@ import ( "sync/atomic" "time" - "github.com/topfreegames/pitaya/v2/conn/codec" - "github.com/topfreegames/pitaya/v2/conn/message" - "github.com/topfreegames/pitaya/v2/conn/packet" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/errors" - "github.com/topfreegames/pitaya/v2/logger" - "github.com/topfreegames/pitaya/v2/metrics" - "github.com/topfreegames/pitaya/v2/protos" - "github.com/topfreegames/pitaya/v2/serialize" - "github.com/topfreegames/pitaya/v2/session" - "github.com/topfreegames/pitaya/v2/tracing" - "github.com/topfreegames/pitaya/v2/util" - "github.com/topfreegames/pitaya/v2/util/compression" + "github.com/topfreegames/pitaya/v3/pkg/conn/codec" + "github.com/topfreegames/pitaya/v3/pkg/conn/message" + "github.com/topfreegames/pitaya/v3/pkg/conn/packet" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/errors" + "github.com/topfreegames/pitaya/v3/pkg/logger" + "github.com/topfreegames/pitaya/v3/pkg/metrics" + "github.com/topfreegames/pitaya/v3/pkg/protos" + "github.com/topfreegames/pitaya/v3/pkg/serialize" + "github.com/topfreegames/pitaya/v3/pkg/session" + "github.com/topfreegames/pitaya/v3/pkg/tracing" + "github.com/topfreegames/pitaya/v3/pkg/util" + "github.com/topfreegames/pitaya/v3/pkg/util/compression" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" diff --git a/agent/agent_remote.go b/pkg/agent/agent_remote.go similarity index 91% rename from agent/agent_remote.go rename to pkg/agent/agent_remote.go index 4e387eda..c50b9fba 100644 --- a/agent/agent_remote.go +++ b/pkg/agent/agent_remote.go @@ -26,17 +26,17 @@ import ( "reflect" "github.com/golang/protobuf/proto" - "github.com/topfreegames/pitaya/v2/cluster" - "github.com/topfreegames/pitaya/v2/conn/codec" - "github.com/topfreegames/pitaya/v2/conn/message" - "github.com/topfreegames/pitaya/v2/conn/packet" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/logger" - "github.com/topfreegames/pitaya/v2/protos" - "github.com/topfreegames/pitaya/v2/route" - "github.com/topfreegames/pitaya/v2/serialize" - "github.com/topfreegames/pitaya/v2/session" - "github.com/topfreegames/pitaya/v2/util" + "github.com/topfreegames/pitaya/v3/pkg/cluster" + "github.com/topfreegames/pitaya/v3/pkg/conn/codec" + "github.com/topfreegames/pitaya/v3/pkg/conn/message" + "github.com/topfreegames/pitaya/v3/pkg/conn/packet" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/logger" + "github.com/topfreegames/pitaya/v3/pkg/protos" + "github.com/topfreegames/pitaya/v3/pkg/route" + "github.com/topfreegames/pitaya/v3/pkg/serialize" + "github.com/topfreegames/pitaya/v3/pkg/session" + "github.com/topfreegames/pitaya/v3/pkg/util" ) // Remote corresponding to another server diff --git a/agent/agent_remote_test.go b/pkg/agent/agent_remote_test.go similarity index 94% rename from agent/agent_remote_test.go rename to pkg/agent/agent_remote_test.go index 3bb6ad89..d7fd24e4 100644 --- a/agent/agent_remote_test.go +++ b/pkg/agent/agent_remote_test.go @@ -30,17 +30,17 @@ import ( "github.com/golang/mock/gomock" "github.com/google/uuid" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/cluster" - clustermocks "github.com/topfreegames/pitaya/v2/cluster/mocks" - codecmocks "github.com/topfreegames/pitaya/v2/conn/codec/mocks" - "github.com/topfreegames/pitaya/v2/conn/message" - messagemocks "github.com/topfreegames/pitaya/v2/conn/message/mocks" - "github.com/topfreegames/pitaya/v2/conn/packet" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/protos" - "github.com/topfreegames/pitaya/v2/route" - serializemocks "github.com/topfreegames/pitaya/v2/serialize/mocks" - "github.com/topfreegames/pitaya/v2/session" + "github.com/topfreegames/pitaya/v3/pkg/cluster" + clustermocks "github.com/topfreegames/pitaya/v3/pkg/cluster/mocks" + codecmocks "github.com/topfreegames/pitaya/v3/pkg/conn/codec/mocks" + "github.com/topfreegames/pitaya/v3/pkg/conn/message" + messagemocks "github.com/topfreegames/pitaya/v3/pkg/conn/message/mocks" + "github.com/topfreegames/pitaya/v3/pkg/conn/packet" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/protos" + "github.com/topfreegames/pitaya/v3/pkg/route" + serializemocks "github.com/topfreegames/pitaya/v3/pkg/serialize/mocks" + "github.com/topfreegames/pitaya/v3/pkg/session" ) type someStruct struct { diff --git a/agent/agent_test.go b/pkg/agent/agent_test.go similarity index 98% rename from agent/agent_test.go rename to pkg/agent/agent_test.go index a9379af6..927cba28 100644 --- a/agent/agent_test.go +++ b/pkg/agent/agent_test.go @@ -33,20 +33,20 @@ import ( "github.com/golang/mock/gomock" "github.com/google/uuid" "github.com/stretchr/testify/assert" - codecmocks "github.com/topfreegames/pitaya/v2/conn/codec/mocks" - "github.com/topfreegames/pitaya/v2/conn/message" - messagemocks "github.com/topfreegames/pitaya/v2/conn/message/mocks" - "github.com/topfreegames/pitaya/v2/conn/packet" - "github.com/topfreegames/pitaya/v2/constants" - pcontext "github.com/topfreegames/pitaya/v2/context" - e "github.com/topfreegames/pitaya/v2/errors" - "github.com/topfreegames/pitaya/v2/helpers" - "github.com/topfreegames/pitaya/v2/metrics" - metricsmocks "github.com/topfreegames/pitaya/v2/metrics/mocks" - "github.com/topfreegames/pitaya/v2/mocks" - "github.com/topfreegames/pitaya/v2/protos" - serializemocks "github.com/topfreegames/pitaya/v2/serialize/mocks" - "github.com/topfreegames/pitaya/v2/session" + codecmocks "github.com/topfreegames/pitaya/v3/pkg/conn/codec/mocks" + "github.com/topfreegames/pitaya/v3/pkg/conn/message" + messagemocks "github.com/topfreegames/pitaya/v3/pkg/conn/message/mocks" + "github.com/topfreegames/pitaya/v3/pkg/conn/packet" + "github.com/topfreegames/pitaya/v3/pkg/constants" + pcontext "github.com/topfreegames/pitaya/v3/pkg/context" + e "github.com/topfreegames/pitaya/v3/pkg/errors" + "github.com/topfreegames/pitaya/v3/pkg/helpers" + "github.com/topfreegames/pitaya/v3/pkg/metrics" + metricsmocks "github.com/topfreegames/pitaya/v3/pkg/metrics/mocks" + "github.com/topfreegames/pitaya/v3/pkg/mocks" + "github.com/topfreegames/pitaya/v3/pkg/protos" + serializemocks "github.com/topfreegames/pitaya/v3/pkg/serialize/mocks" + "github.com/topfreegames/pitaya/v3/pkg/session" ) type mockAddr struct{} diff --git a/agent/mocks/agent.go b/pkg/agent/mocks/agent.go similarity index 98% rename from agent/mocks/agent.go rename to pkg/agent/mocks/agent.go index 256f7fd2..8f623ec7 100644 --- a/agent/mocks/agent.go +++ b/pkg/agent/mocks/agent.go @@ -10,9 +10,9 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - agent "github.com/topfreegames/pitaya/v2/agent" - protos "github.com/topfreegames/pitaya/v2/protos" - session "github.com/topfreegames/pitaya/v2/session" + agent "github.com/topfreegames/pitaya/v3/pkg/agent" + protos "github.com/topfreegames/pitaya/v3/pkg/protos" + session "github.com/topfreegames/pitaya/v3/pkg/session" ) // MockAgent is a mock of Agent interface. diff --git a/app.go b/pkg/app.go similarity index 93% rename from app.go rename to pkg/app.go index 75e5cc3f..0a8e6372 100644 --- a/app.go +++ b/pkg/app.go @@ -31,29 +31,29 @@ import ( "time" "github.com/golang/protobuf/proto" - "github.com/topfreegames/pitaya/v2/acceptor" - "github.com/topfreegames/pitaya/v2/cluster" - "github.com/topfreegames/pitaya/v2/component" - "github.com/topfreegames/pitaya/v2/config" - "github.com/topfreegames/pitaya/v2/conn/message" - "github.com/topfreegames/pitaya/v2/constants" - pcontext "github.com/topfreegames/pitaya/v2/context" - "github.com/topfreegames/pitaya/v2/docgenerator" - "github.com/topfreegames/pitaya/v2/errors" - "github.com/topfreegames/pitaya/v2/groups" - "github.com/topfreegames/pitaya/v2/interfaces" - "github.com/topfreegames/pitaya/v2/logger" - logging "github.com/topfreegames/pitaya/v2/logger/interfaces" - "github.com/topfreegames/pitaya/v2/metrics" - mods "github.com/topfreegames/pitaya/v2/modules" - "github.com/topfreegames/pitaya/v2/remote" - "github.com/topfreegames/pitaya/v2/router" - "github.com/topfreegames/pitaya/v2/serialize" - "github.com/topfreegames/pitaya/v2/service" - "github.com/topfreegames/pitaya/v2/session" - "github.com/topfreegames/pitaya/v2/timer" - "github.com/topfreegames/pitaya/v2/tracing" - "github.com/topfreegames/pitaya/v2/worker" + "github.com/topfreegames/pitaya/v3/pkg/acceptor" + "github.com/topfreegames/pitaya/v3/pkg/cluster" + "github.com/topfreegames/pitaya/v3/pkg/component" + "github.com/topfreegames/pitaya/v3/pkg/config" + "github.com/topfreegames/pitaya/v3/pkg/conn/message" + "github.com/topfreegames/pitaya/v3/pkg/constants" + pcontext "github.com/topfreegames/pitaya/v3/pkg/context" + "github.com/topfreegames/pitaya/v3/pkg/docgenerator" + "github.com/topfreegames/pitaya/v3/pkg/errors" + "github.com/topfreegames/pitaya/v3/pkg/groups" + "github.com/topfreegames/pitaya/v3/pkg/interfaces" + "github.com/topfreegames/pitaya/v3/pkg/logger" + logging "github.com/topfreegames/pitaya/v3/pkg/logger/interfaces" + "github.com/topfreegames/pitaya/v3/pkg/metrics" + mods "github.com/topfreegames/pitaya/v3/pkg/modules" + "github.com/topfreegames/pitaya/v3/pkg/remote" + "github.com/topfreegames/pitaya/v3/pkg/router" + "github.com/topfreegames/pitaya/v3/pkg/serialize" + "github.com/topfreegames/pitaya/v3/pkg/service" + "github.com/topfreegames/pitaya/v3/pkg/session" + "github.com/topfreegames/pitaya/v3/pkg/timer" + "github.com/topfreegames/pitaya/v3/pkg/tracing" + "github.com/topfreegames/pitaya/v3/pkg/worker" "go.opentelemetry.io/otel/trace" ) diff --git a/app_test.go b/pkg/app_test.go similarity index 96% rename from app_test.go rename to pkg/app_test.go index 5e175cf5..835316da 100644 --- a/app_test.go +++ b/pkg/app_test.go @@ -34,20 +34,20 @@ import ( "github.com/google/uuid" "github.com/spf13/viper" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/acceptor" - "github.com/topfreegames/pitaya/v2/cluster" - "github.com/topfreegames/pitaya/v2/config" - "github.com/topfreegames/pitaya/v2/conn/message" - "github.com/topfreegames/pitaya/v2/constants" - e "github.com/topfreegames/pitaya/v2/errors" - "github.com/topfreegames/pitaya/v2/helpers" - "github.com/topfreegames/pitaya/v2/logger" - "github.com/topfreegames/pitaya/v2/logger/logrus" - "github.com/topfreegames/pitaya/v2/route" - "github.com/topfreegames/pitaya/v2/router" - "github.com/topfreegames/pitaya/v2/session/mocks" - "github.com/topfreegames/pitaya/v2/timer" - "github.com/topfreegames/pitaya/v2/tracing" + "github.com/topfreegames/pitaya/v3/pkg/acceptor" + "github.com/topfreegames/pitaya/v3/pkg/cluster" + "github.com/topfreegames/pitaya/v3/pkg/config" + "github.com/topfreegames/pitaya/v3/pkg/conn/message" + "github.com/topfreegames/pitaya/v3/pkg/constants" + e "github.com/topfreegames/pitaya/v3/pkg/errors" + "github.com/topfreegames/pitaya/v3/pkg/helpers" + "github.com/topfreegames/pitaya/v3/pkg/logger" + "github.com/topfreegames/pitaya/v3/pkg/logger/logrus" + "github.com/topfreegames/pitaya/v3/pkg/route" + "github.com/topfreegames/pitaya/v3/pkg/router" + "github.com/topfreegames/pitaya/v3/pkg/session/mocks" + "github.com/topfreegames/pitaya/v3/pkg/timer" + "github.com/topfreegames/pitaya/v3/pkg/tracing" ) var ( diff --git a/builder.go b/pkg/builder.go similarity index 91% rename from builder.go rename to pkg/builder.go index dc58f5f3..d7657cc4 100644 --- a/builder.go +++ b/pkg/builder.go @@ -2,23 +2,23 @@ package pitaya import ( "github.com/google/uuid" - "github.com/topfreegames/pitaya/v2/acceptor" - "github.com/topfreegames/pitaya/v2/agent" - "github.com/topfreegames/pitaya/v2/cluster" - "github.com/topfreegames/pitaya/v2/config" - "github.com/topfreegames/pitaya/v2/conn/codec" - "github.com/topfreegames/pitaya/v2/conn/message" - "github.com/topfreegames/pitaya/v2/defaultpipelines" - "github.com/topfreegames/pitaya/v2/groups" - "github.com/topfreegames/pitaya/v2/logger" - "github.com/topfreegames/pitaya/v2/metrics" - "github.com/topfreegames/pitaya/v2/metrics/models" - "github.com/topfreegames/pitaya/v2/pipeline" - "github.com/topfreegames/pitaya/v2/router" - "github.com/topfreegames/pitaya/v2/serialize" - "github.com/topfreegames/pitaya/v2/service" - "github.com/topfreegames/pitaya/v2/session" - "github.com/topfreegames/pitaya/v2/worker" + "github.com/topfreegames/pitaya/v3/pkg/acceptor" + "github.com/topfreegames/pitaya/v3/pkg/agent" + "github.com/topfreegames/pitaya/v3/pkg/cluster" + "github.com/topfreegames/pitaya/v3/pkg/config" + "github.com/topfreegames/pitaya/v3/pkg/conn/codec" + "github.com/topfreegames/pitaya/v3/pkg/conn/message" + "github.com/topfreegames/pitaya/v3/pkg/defaultpipelines" + "github.com/topfreegames/pitaya/v3/pkg/groups" + "github.com/topfreegames/pitaya/v3/pkg/logger" + "github.com/topfreegames/pitaya/v3/pkg/metrics" + "github.com/topfreegames/pitaya/v3/pkg/metrics/models" + "github.com/topfreegames/pitaya/v3/pkg/pipeline" + "github.com/topfreegames/pitaya/v3/pkg/router" + "github.com/topfreegames/pitaya/v3/pkg/serialize" + "github.com/topfreegames/pitaya/v3/pkg/service" + "github.com/topfreegames/pitaya/v3/pkg/session" + "github.com/topfreegames/pitaya/v3/pkg/worker" ) // Builder holds dependency instances for a pitaya App diff --git a/builder_test.go b/pkg/builder_test.go similarity index 95% rename from builder_test.go rename to pkg/builder_test.go index fd5d639d..8e5767a5 100644 --- a/builder_test.go +++ b/pkg/builder_test.go @@ -24,8 +24,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/acceptor" - "github.com/topfreegames/pitaya/v2/config" + "github.com/topfreegames/pitaya/v3/pkg/acceptor" + "github.com/topfreegames/pitaya/v3/pkg/config" ) func TestPostBuildHooks(t *testing.T) { diff --git a/client/client.go b/pkg/client/client.go similarity index 95% rename from client/client.go rename to pkg/client/client.go index 9fd6de78..c98b1199 100644 --- a/client/client.go +++ b/pkg/client/client.go @@ -32,18 +32,18 @@ import ( "sync/atomic" "time" - "github.com/topfreegames/pitaya/v2/acceptor" + "github.com/topfreegames/pitaya/v3/pkg/acceptor" "github.com/gorilla/websocket" "github.com/sirupsen/logrus" - "github.com/topfreegames/pitaya/v2" - "github.com/topfreegames/pitaya/v2/conn/codec" - "github.com/topfreegames/pitaya/v2/conn/message" - "github.com/topfreegames/pitaya/v2/conn/packet" - "github.com/topfreegames/pitaya/v2/logger" - logruswrapper "github.com/topfreegames/pitaya/v2/logger/logrus" - "github.com/topfreegames/pitaya/v2/session" - "github.com/topfreegames/pitaya/v2/util/compression" + "github.com/topfreegames/pitaya/v3/pkg" + "github.com/topfreegames/pitaya/v3/pkg/conn/codec" + "github.com/topfreegames/pitaya/v3/pkg/conn/message" + "github.com/topfreegames/pitaya/v3/pkg/conn/packet" + "github.com/topfreegames/pitaya/v3/pkg/logger" + logruswrapper "github.com/topfreegames/pitaya/v3/pkg/logger/logrus" + "github.com/topfreegames/pitaya/v3/pkg/session" + "github.com/topfreegames/pitaya/v3/pkg/util/compression" ) // HandshakeSys struct diff --git a/client/client_test.go b/pkg/client/client_test.go similarity index 85% rename from client/client_test.go rename to pkg/client/client_test.go index 13388868..fd384a3a 100644 --- a/client/client_test.go +++ b/pkg/client/client_test.go @@ -7,9 +7,9 @@ import ( "github.com/golang/mock/gomock" "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/conn/message" - "github.com/topfreegames/pitaya/v2/helpers" - "github.com/topfreegames/pitaya/v2/mocks" + "github.com/topfreegames/pitaya/v3/pkg/conn/message" + "github.com/topfreegames/pitaya/v3/pkg/helpers" + "github.com/topfreegames/pitaya/v3/pkg/mocks" ) func TestSendRequestShouldTimeout(t *testing.T) { diff --git a/client/pitayaclient.go b/pkg/client/pitayaclient.go similarity index 93% rename from client/pitayaclient.go rename to pkg/client/pitayaclient.go index b8cb5487..dec4b925 100644 --- a/client/pitayaclient.go +++ b/pkg/client/pitayaclient.go @@ -23,8 +23,8 @@ package client import ( "crypto/tls" - "github.com/topfreegames/pitaya/v2/conn/message" - "github.com/topfreegames/pitaya/v2/session" + "github.com/topfreegames/pitaya/v3/pkg/conn/message" + "github.com/topfreegames/pitaya/v3/pkg/session" ) // PitayaClient iface diff --git a/client/protoclient.go b/pkg/client/protoclient.go similarity index 98% rename from client/protoclient.go rename to pkg/client/protoclient.go index 62ed2ed1..ed07a3ed 100644 --- a/client/protoclient.go +++ b/pkg/client/protoclient.go @@ -36,9 +36,9 @@ import ( "github.com/jhump/protoreflect/desc" "github.com/jhump/protoreflect/dynamic" "github.com/sirupsen/logrus" - "github.com/topfreegames/pitaya/v2/conn/message" - "github.com/topfreegames/pitaya/v2/logger" - "github.com/topfreegames/pitaya/v2/protos" + "github.com/topfreegames/pitaya/v3/pkg/conn/message" + "github.com/topfreegames/pitaya/v3/pkg/logger" + "github.com/topfreegames/pitaya/v3/pkg/protos" ) // Command struct. Save the input and output type and proto descriptor for each diff --git a/cluster/cluster.go b/pkg/cluster/cluster.go similarity index 88% rename from cluster/cluster.go rename to pkg/cluster/cluster.go index 2b2a0d1a..ecb2ee83 100644 --- a/cluster/cluster.go +++ b/pkg/cluster/cluster.go @@ -23,15 +23,15 @@ package cluster import ( "context" - "github.com/topfreegames/pitaya/v2/conn/message" - "github.com/topfreegames/pitaya/v2/constants" - pcontext "github.com/topfreegames/pitaya/v2/context" - "github.com/topfreegames/pitaya/v2/interfaces" - "github.com/topfreegames/pitaya/v2/logger" - "github.com/topfreegames/pitaya/v2/protos" - "github.com/topfreegames/pitaya/v2/route" - "github.com/topfreegames/pitaya/v2/session" - "github.com/topfreegames/pitaya/v2/tracing" + "github.com/topfreegames/pitaya/v3/pkg/conn/message" + "github.com/topfreegames/pitaya/v3/pkg/constants" + pcontext "github.com/topfreegames/pitaya/v3/pkg/context" + "github.com/topfreegames/pitaya/v3/pkg/interfaces" + "github.com/topfreegames/pitaya/v3/pkg/logger" + "github.com/topfreegames/pitaya/v3/pkg/protos" + "github.com/topfreegames/pitaya/v3/pkg/route" + "github.com/topfreegames/pitaya/v3/pkg/session" + "github.com/topfreegames/pitaya/v3/pkg/tracing" ) // RPCServer interface diff --git a/cluster/etcd_service_discovery.go b/pkg/cluster/etcd_service_discovery.go similarity index 99% rename from cluster/etcd_service_discovery.go rename to pkg/cluster/etcd_service_discovery.go index 518a1e97..912eca6d 100644 --- a/cluster/etcd_service_discovery.go +++ b/pkg/cluster/etcd_service_discovery.go @@ -27,10 +27,10 @@ import ( "strings" "sync" "time" - "github.com/topfreegames/pitaya/v2/config" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/logger" - "github.com/topfreegames/pitaya/v2/util" + "github.com/topfreegames/pitaya/v3/pkg/config" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/logger" + "github.com/topfreegames/pitaya/v3/pkg/util" clientv3 "go.etcd.io/etcd/client/v3" logutil "go.etcd.io/etcd/client/pkg/v3/logutil" "go.etcd.io/etcd/client/v3/namespace" diff --git a/cluster/etcd_service_discovery_test.go b/pkg/cluster/etcd_service_discovery_test.go similarity index 99% rename from cluster/etcd_service_discovery_test.go rename to pkg/cluster/etcd_service_discovery_test.go index 5259b64c..76af4e31 100644 --- a/cluster/etcd_service_discovery_test.go +++ b/pkg/cluster/etcd_service_discovery_test.go @@ -27,9 +27,9 @@ import ( "time" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/config" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/helpers" + "github.com/topfreegames/pitaya/v3/pkg/config" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/helpers" clientv3 "go.etcd.io/etcd/client/v3" ) diff --git a/cluster/grpc_rpc_client.go b/pkg/cluster/grpc_rpc_client.go similarity index 94% rename from cluster/grpc_rpc_client.go rename to pkg/cluster/grpc_rpc_client.go index dd268e35..37c6acd2 100644 --- a/cluster/grpc_rpc_client.go +++ b/pkg/cluster/grpc_rpc_client.go @@ -27,18 +27,18 @@ import ( "time" "github.com/google/uuid" - "github.com/topfreegames/pitaya/v2/config" - "github.com/topfreegames/pitaya/v2/conn/message" - "github.com/topfreegames/pitaya/v2/constants" - pcontext "github.com/topfreegames/pitaya/v2/context" - pitErrors "github.com/topfreegames/pitaya/v2/errors" - "github.com/topfreegames/pitaya/v2/interfaces" - "github.com/topfreegames/pitaya/v2/logger" - "github.com/topfreegames/pitaya/v2/metrics" - "github.com/topfreegames/pitaya/v2/protos" - "github.com/topfreegames/pitaya/v2/route" - "github.com/topfreegames/pitaya/v2/session" - "github.com/topfreegames/pitaya/v2/tracing" + "github.com/topfreegames/pitaya/v3/pkg/config" + "github.com/topfreegames/pitaya/v3/pkg/conn/message" + "github.com/topfreegames/pitaya/v3/pkg/constants" + pcontext "github.com/topfreegames/pitaya/v3/pkg/context" + pitErrors "github.com/topfreegames/pitaya/v3/pkg/errors" + "github.com/topfreegames/pitaya/v3/pkg/interfaces" + "github.com/topfreegames/pitaya/v3/pkg/logger" + "github.com/topfreegames/pitaya/v3/pkg/metrics" + "github.com/topfreegames/pitaya/v3/pkg/protos" + "github.com/topfreegames/pitaya/v3/pkg/route" + "github.com/topfreegames/pitaya/v3/pkg/session" + "github.com/topfreegames/pitaya/v3/pkg/tracing" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/trace" "google.golang.org/grpc" diff --git a/cluster/grpc_rpc_client_test.go b/pkg/cluster/grpc_rpc_client_test.go similarity index 95% rename from cluster/grpc_rpc_client_test.go rename to pkg/cluster/grpc_rpc_client_test.go index e899ff46..bb7ededb 100644 --- a/cluster/grpc_rpc_client_test.go +++ b/pkg/cluster/grpc_rpc_client_test.go @@ -7,17 +7,17 @@ import ( "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/config" - "github.com/topfreegames/pitaya/v2/conn/message" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/helpers" - "github.com/topfreegames/pitaya/v2/interfaces" - "github.com/topfreegames/pitaya/v2/interfaces/mocks" - "github.com/topfreegames/pitaya/v2/metrics" - "github.com/topfreegames/pitaya/v2/protos" - protosmocks "github.com/topfreegames/pitaya/v2/protos/mocks" - "github.com/topfreegames/pitaya/v2/route" - sessionmocks "github.com/topfreegames/pitaya/v2/session/mocks" + "github.com/topfreegames/pitaya/v3/pkg/config" + "github.com/topfreegames/pitaya/v3/pkg/conn/message" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/helpers" + "github.com/topfreegames/pitaya/v3/pkg/interfaces" + "github.com/topfreegames/pitaya/v3/pkg/interfaces/mocks" + "github.com/topfreegames/pitaya/v3/pkg/metrics" + "github.com/topfreegames/pitaya/v3/pkg/protos" + protosmocks "github.com/topfreegames/pitaya/v3/pkg/protos/mocks" + "github.com/topfreegames/pitaya/v3/pkg/route" + sessionmocks "github.com/topfreegames/pitaya/v3/pkg/session/mocks" "google.golang.org/grpc" ) diff --git a/cluster/grpc_rpc_server.go b/pkg/cluster/grpc_rpc_server.go similarity index 94% rename from cluster/grpc_rpc_server.go rename to pkg/cluster/grpc_rpc_server.go index 95a722c8..206a6846 100644 --- a/cluster/grpc_rpc_server.go +++ b/pkg/cluster/grpc_rpc_server.go @@ -26,9 +26,9 @@ import ( "google.golang.org/grpc" - "github.com/topfreegames/pitaya/v2/config" - "github.com/topfreegames/pitaya/v2/metrics" - "github.com/topfreegames/pitaya/v2/protos" + "github.com/topfreegames/pitaya/v3/pkg/config" + "github.com/topfreegames/pitaya/v3/pkg/metrics" + "github.com/topfreegames/pitaya/v3/pkg/protos" ) // GRPCServer rpc server struct diff --git a/cluster/grpc_rpc_server_test.go b/pkg/cluster/grpc_rpc_server_test.go similarity index 81% rename from cluster/grpc_rpc_server_test.go rename to pkg/cluster/grpc_rpc_server_test.go index 02fb5cb5..31ca32ec 100644 --- a/cluster/grpc_rpc_server_test.go +++ b/pkg/cluster/grpc_rpc_server_test.go @@ -8,10 +8,10 @@ import ( "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/config" - "github.com/topfreegames/pitaya/v2/helpers" - "github.com/topfreegames/pitaya/v2/metrics" - protosmocks "github.com/topfreegames/pitaya/v2/protos/mocks" + "github.com/topfreegames/pitaya/v3/pkg/config" + "github.com/topfreegames/pitaya/v3/pkg/helpers" + "github.com/topfreegames/pitaya/v3/pkg/metrics" + protosmocks "github.com/topfreegames/pitaya/v3/pkg/protos/mocks" ) func TestNewGRPCServer(t *testing.T) { diff --git a/cluster/info_retriever.go b/pkg/cluster/info_retriever.go similarity index 88% rename from cluster/info_retriever.go rename to pkg/cluster/info_retriever.go index 0875dca3..c9b4bb54 100644 --- a/cluster/info_retriever.go +++ b/pkg/cluster/info_retriever.go @@ -1,6 +1,6 @@ package cluster -import "github.com/topfreegames/pitaya/v2/config" +import "github.com/topfreegames/pitaya/v3/pkg/config" // infoRetriever gets cluster info from config // Implements InfoRetriever interface diff --git a/cluster/info_retriever_test.go b/pkg/cluster/info_retriever_test.go similarity index 88% rename from cluster/info_retriever_test.go rename to pkg/cluster/info_retriever_test.go index 60b3830e..caac4aab 100644 --- a/cluster/info_retriever_test.go +++ b/pkg/cluster/info_retriever_test.go @@ -5,7 +5,7 @@ import ( "github.com/spf13/viper" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/config" + "github.com/topfreegames/pitaya/v3/pkg/config" ) func TestInfoRetrieverRegion(t *testing.T) { diff --git a/cluster/mocks/cluster.go b/pkg/cluster/mocks/cluster.go similarity index 97% rename from cluster/mocks/cluster.go rename to pkg/cluster/mocks/cluster.go index 03f524f2..66211b6a 100644 --- a/cluster/mocks/cluster.go +++ b/pkg/cluster/mocks/cluster.go @@ -9,11 +9,11 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - cluster "github.com/topfreegames/pitaya/v2/cluster" - message "github.com/topfreegames/pitaya/v2/conn/message" - protos "github.com/topfreegames/pitaya/v2/protos" - route "github.com/topfreegames/pitaya/v2/route" - session "github.com/topfreegames/pitaya/v2/session" + cluster "github.com/topfreegames/pitaya/v3/pkg/cluster" + message "github.com/topfreegames/pitaya/v3/pkg/conn/message" + protos "github.com/topfreegames/pitaya/v3/pkg/protos" + route "github.com/topfreegames/pitaya/v3/pkg/route" + session "github.com/topfreegames/pitaya/v3/pkg/session" ) // MockRPCServer is a mock of RPCServer interface. diff --git a/cluster/mocks/service_discovery.go b/pkg/cluster/mocks/service_discovery.go similarity index 98% rename from cluster/mocks/service_discovery.go rename to pkg/cluster/mocks/service_discovery.go index 60abcd6a..022c4792 100644 --- a/cluster/mocks/service_discovery.go +++ b/pkg/cluster/mocks/service_discovery.go @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - cluster "github.com/topfreegames/pitaya/v2/cluster" + cluster "github.com/topfreegames/pitaya/v3/pkg/cluster" ) // MockServiceDiscovery is a mock of ServiceDiscovery interface. diff --git a/cluster/nats_rpc_client.go b/pkg/cluster/nats_rpc_client.go similarity index 93% rename from cluster/nats_rpc_client.go rename to pkg/cluster/nats_rpc_client.go index 1d91e21d..afbc55af 100644 --- a/cluster/nats_rpc_client.go +++ b/pkg/cluster/nats_rpc_client.go @@ -28,17 +28,17 @@ import ( "github.com/golang/protobuf/proto" "github.com/google/uuid" nats "github.com/nats-io/nats.go" - "github.com/topfreegames/pitaya/v2/config" - "github.com/topfreegames/pitaya/v2/conn/message" - "github.com/topfreegames/pitaya/v2/constants" - pcontext "github.com/topfreegames/pitaya/v2/context" - "github.com/topfreegames/pitaya/v2/errors" - "github.com/topfreegames/pitaya/v2/logger" - "github.com/topfreegames/pitaya/v2/metrics" - "github.com/topfreegames/pitaya/v2/protos" - "github.com/topfreegames/pitaya/v2/route" - "github.com/topfreegames/pitaya/v2/session" - "github.com/topfreegames/pitaya/v2/tracing" + "github.com/topfreegames/pitaya/v3/pkg/config" + "github.com/topfreegames/pitaya/v3/pkg/conn/message" + "github.com/topfreegames/pitaya/v3/pkg/constants" + pcontext "github.com/topfreegames/pitaya/v3/pkg/context" + "github.com/topfreegames/pitaya/v3/pkg/errors" + "github.com/topfreegames/pitaya/v3/pkg/logger" + "github.com/topfreegames/pitaya/v3/pkg/metrics" + "github.com/topfreegames/pitaya/v3/pkg/protos" + "github.com/topfreegames/pitaya/v3/pkg/route" + "github.com/topfreegames/pitaya/v3/pkg/session" + "github.com/topfreegames/pitaya/v3/pkg/tracing" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/trace" ) diff --git a/cluster/nats_rpc_client_test.go b/pkg/cluster/nats_rpc_client_test.go similarity index 96% rename from cluster/nats_rpc_client_test.go rename to pkg/cluster/nats_rpc_client_test.go index 19eedb8e..b53ca770 100644 --- a/cluster/nats_rpc_client_test.go +++ b/pkg/cluster/nats_rpc_client_test.go @@ -32,16 +32,16 @@ import ( "github.com/google/uuid" nats "github.com/nats-io/nats.go" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/config" - "github.com/topfreegames/pitaya/v2/conn/message" - "github.com/topfreegames/pitaya/v2/constants" - e "github.com/topfreegames/pitaya/v2/errors" - "github.com/topfreegames/pitaya/v2/helpers" - "github.com/topfreegames/pitaya/v2/metrics" - metricsmocks "github.com/topfreegames/pitaya/v2/metrics/mocks" - "github.com/topfreegames/pitaya/v2/protos" - "github.com/topfreegames/pitaya/v2/route" - sessionmocks "github.com/topfreegames/pitaya/v2/session/mocks" + "github.com/topfreegames/pitaya/v3/pkg/config" + "github.com/topfreegames/pitaya/v3/pkg/conn/message" + "github.com/topfreegames/pitaya/v3/pkg/constants" + e "github.com/topfreegames/pitaya/v3/pkg/errors" + "github.com/topfreegames/pitaya/v3/pkg/helpers" + "github.com/topfreegames/pitaya/v3/pkg/metrics" + metricsmocks "github.com/topfreegames/pitaya/v3/pkg/metrics/mocks" + "github.com/topfreegames/pitaya/v3/pkg/protos" + "github.com/topfreegames/pitaya/v3/pkg/route" + sessionmocks "github.com/topfreegames/pitaya/v3/pkg/session/mocks" ) func TestNewNatsRPCClient(t *testing.T) { diff --git a/cluster/nats_rpc_common.go b/pkg/cluster/nats_rpc_common.go similarity index 98% rename from cluster/nats_rpc_common.go rename to pkg/cluster/nats_rpc_common.go index 40dceb7a..8c5fe93a 100644 --- a/cluster/nats_rpc_common.go +++ b/pkg/cluster/nats_rpc_common.go @@ -24,7 +24,7 @@ import ( "fmt" nats "github.com/nats-io/nats.go" - "github.com/topfreegames/pitaya/v2/logger" + "github.com/topfreegames/pitaya/v3/pkg/logger" ) func getChannel(serverType, serverID string) string { diff --git a/cluster/nats_rpc_common_test.go b/pkg/cluster/nats_rpc_common_test.go similarity index 97% rename from cluster/nats_rpc_common_test.go rename to pkg/cluster/nats_rpc_common_test.go index e404703e..da7eeba2 100644 --- a/cluster/nats_rpc_common_test.go +++ b/pkg/cluster/nats_rpc_common_test.go @@ -27,7 +27,7 @@ import ( nats "github.com/nats-io/nats.go" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/helpers" + "github.com/topfreegames/pitaya/v3/pkg/helpers" ) func getServer() *Server { diff --git a/cluster/nats_rpc_server.go b/pkg/cluster/nats_rpc_server.go similarity index 97% rename from cluster/nats_rpc_server.go rename to pkg/cluster/nats_rpc_server.go index 42e360d5..b9df3d9c 100644 --- a/cluster/nats_rpc_server.go +++ b/pkg/cluster/nats_rpc_server.go @@ -29,14 +29,14 @@ import ( "github.com/golang/protobuf/proto" nats "github.com/nats-io/nats.go" - "github.com/topfreegames/pitaya/v2/config" - "github.com/topfreegames/pitaya/v2/constants" - e "github.com/topfreegames/pitaya/v2/errors" - "github.com/topfreegames/pitaya/v2/logger" - "github.com/topfreegames/pitaya/v2/metrics" - "github.com/topfreegames/pitaya/v2/protos" - "github.com/topfreegames/pitaya/v2/session" - "github.com/topfreegames/pitaya/v2/util" + "github.com/topfreegames/pitaya/v3/pkg/config" + "github.com/topfreegames/pitaya/v3/pkg/constants" + e "github.com/topfreegames/pitaya/v3/pkg/errors" + "github.com/topfreegames/pitaya/v3/pkg/logger" + "github.com/topfreegames/pitaya/v3/pkg/metrics" + "github.com/topfreegames/pitaya/v3/pkg/protos" + "github.com/topfreegames/pitaya/v3/pkg/session" + "github.com/topfreegames/pitaya/v3/pkg/util" ) // NatsRPCServer struct diff --git a/cluster/nats_rpc_server_test.go b/pkg/cluster/nats_rpc_server_test.go similarity index 97% rename from cluster/nats_rpc_server_test.go rename to pkg/cluster/nats_rpc_server_test.go index 2661ada6..f4abcb8d 100644 --- a/cluster/nats_rpc_server_test.go +++ b/pkg/cluster/nats_rpc_server_test.go @@ -31,14 +31,14 @@ import ( "github.com/golang/protobuf/proto" nats "github.com/nats-io/nats.go" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/config" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/helpers" - "github.com/topfreegames/pitaya/v2/metrics" - metricsmocks "github.com/topfreegames/pitaya/v2/metrics/mocks" - "github.com/topfreegames/pitaya/v2/protos" - protosmocks "github.com/topfreegames/pitaya/v2/protos/mocks" - sessionmocks "github.com/topfreegames/pitaya/v2/session/mocks" + "github.com/topfreegames/pitaya/v3/pkg/config" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/helpers" + "github.com/topfreegames/pitaya/v3/pkg/metrics" + metricsmocks "github.com/topfreegames/pitaya/v3/pkg/metrics/mocks" + "github.com/topfreegames/pitaya/v3/pkg/protos" + protosmocks "github.com/topfreegames/pitaya/v3/pkg/protos/mocks" + sessionmocks "github.com/topfreegames/pitaya/v3/pkg/session/mocks" ) type funcPtrMatcher struct { diff --git a/cluster/server.go b/pkg/cluster/server.go similarity index 97% rename from cluster/server.go rename to pkg/cluster/server.go index 95bfe879..85ad5ad8 100644 --- a/cluster/server.go +++ b/pkg/cluster/server.go @@ -24,7 +24,7 @@ import ( "encoding/json" "os" - "github.com/topfreegames/pitaya/v2/logger" + "github.com/topfreegames/pitaya/v3/pkg/logger" ) // Server struct diff --git a/cluster/server_test.go b/pkg/cluster/server_test.go similarity index 100% rename from cluster/server_test.go rename to pkg/cluster/server_test.go diff --git a/cluster/service_discovery.go b/pkg/cluster/service_discovery.go similarity index 96% rename from cluster/service_discovery.go rename to pkg/cluster/service_discovery.go index ef4871a2..f2dbe142 100644 --- a/cluster/service_discovery.go +++ b/pkg/cluster/service_discovery.go @@ -20,7 +20,7 @@ package cluster -import "github.com/topfreegames/pitaya/v2/interfaces" +import "github.com/topfreegames/pitaya/v3/pkg/interfaces" // ServiceDiscovery is the interface for a service discovery client type ServiceDiscovery interface { diff --git a/component.go b/pkg/component.go similarity index 97% rename from component.go rename to pkg/component.go index 647f0ef6..b270f7e5 100644 --- a/component.go +++ b/pkg/component.go @@ -21,8 +21,8 @@ package pitaya import ( - "github.com/topfreegames/pitaya/v2/component" - "github.com/topfreegames/pitaya/v2/logger" + "github.com/topfreegames/pitaya/v3/pkg/component" + "github.com/topfreegames/pitaya/v3/pkg/logger" ) type regComp struct { diff --git a/component/base.go b/pkg/component/base.go similarity index 100% rename from component/base.go rename to pkg/component/base.go diff --git a/component/component.go b/pkg/component/component.go similarity index 100% rename from component/component.go rename to pkg/component/component.go diff --git a/component/method.go b/pkg/component/method.go similarity index 98% rename from component/method.go rename to pkg/component/method.go index 2d157c3e..9c574845 100644 --- a/component/method.go +++ b/pkg/component/method.go @@ -27,7 +27,7 @@ import ( "unicode/utf8" "github.com/golang/protobuf/proto" - "github.com/topfreegames/pitaya/v2/conn/message" + "github.com/topfreegames/pitaya/v3/pkg/conn/message" ) var ( diff --git a/component/method_test.go b/pkg/component/method_test.go similarity index 98% rename from component/method_test.go rename to pkg/component/method_test.go index 2f67dfa2..816d6f3c 100644 --- a/component/method_test.go +++ b/pkg/component/method_test.go @@ -27,7 +27,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/protos/test" + "github.com/topfreegames/pitaya/v3/pkg/protos/test" ) type TestType struct { diff --git a/component/options.go b/pkg/component/options.go similarity index 100% rename from component/options.go rename to pkg/component/options.go diff --git a/component/options_test.go b/pkg/component/options_test.go similarity index 100% rename from component/options_test.go rename to pkg/component/options_test.go diff --git a/component/service.go b/pkg/component/service.go similarity index 98% rename from component/service.go rename to pkg/component/service.go index 383f9603..8969e466 100644 --- a/component/service.go +++ b/pkg/component/service.go @@ -24,8 +24,8 @@ import ( "errors" "reflect" - "github.com/topfreegames/pitaya/v2/conn/message" - "github.com/topfreegames/pitaya/v2/constants" + "github.com/topfreegames/pitaya/v3/pkg/conn/message" + "github.com/topfreegames/pitaya/v3/pkg/constants" ) type ( diff --git a/component/service_test.go b/pkg/component/service_test.go similarity index 97% rename from component/service_test.go rename to pkg/component/service_test.go index ca2cbe47..fc8ec64d 100644 --- a/component/service_test.go +++ b/pkg/component/service_test.go @@ -25,8 +25,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/conn/message" - "github.com/topfreegames/pitaya/v2/constants" + "github.com/topfreegames/pitaya/v3/pkg/conn/message" + "github.com/topfreegames/pitaya/v3/pkg/constants" ) type unexportedTestType struct { diff --git a/component_test.go b/pkg/component_test.go similarity index 96% rename from component_test.go rename to pkg/component_test.go index 68c9dfa8..f3211c6d 100644 --- a/component_test.go +++ b/pkg/component_test.go @@ -24,8 +24,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/component" - "github.com/topfreegames/pitaya/v2/config" + "github.com/topfreegames/pitaya/v3/pkg/component" + "github.com/topfreegames/pitaya/v3/pkg/config" ) type MyComp struct { diff --git a/config/config.go b/pkg/config/config.go similarity index 99% rename from config/config.go rename to pkg/config/config.go index c88d84bf..48935b86 100644 --- a/config/config.go +++ b/pkg/config/config.go @@ -3,7 +3,7 @@ package config import ( "time" - "github.com/topfreegames/pitaya/v2/metrics/models" + "github.com/topfreegames/pitaya/v3/pkg/metrics/models" ) // PitayaConfig provides all the configuration for a pitaya app diff --git a/config/config_test.go b/pkg/config/config_test.go similarity index 100% rename from config/config_test.go rename to pkg/config/config_test.go diff --git a/config/viper_config.go b/pkg/config/viper_config.go similarity index 100% rename from config/viper_config.go rename to pkg/config/viper_config.go diff --git a/conn/codec/constants.go b/pkg/conn/codec/constants.go similarity index 100% rename from conn/codec/constants.go rename to pkg/conn/codec/constants.go diff --git a/conn/codec/mocks/packet_decoder.go b/pkg/conn/codec/mocks/packet_decoder.go similarity index 95% rename from conn/codec/mocks/packet_decoder.go rename to pkg/conn/codec/mocks/packet_decoder.go index 83a88d40..21cbc258 100644 --- a/conn/codec/mocks/packet_decoder.go +++ b/pkg/conn/codec/mocks/packet_decoder.go @@ -6,7 +6,7 @@ package mocks import ( gomock "github.com/golang/mock/gomock" - packet "github.com/topfreegames/pitaya/v2/conn/packet" + packet "github.com/topfreegames/pitaya/v3/pkg/conn/packet" reflect "reflect" ) diff --git a/conn/codec/mocks/packet_encoder.go b/pkg/conn/codec/mocks/packet_encoder.go similarity index 95% rename from conn/codec/mocks/packet_encoder.go rename to pkg/conn/codec/mocks/packet_encoder.go index a5921f87..76a8ed7e 100644 --- a/conn/codec/mocks/packet_encoder.go +++ b/pkg/conn/codec/mocks/packet_encoder.go @@ -6,7 +6,7 @@ package mocks import ( gomock "github.com/golang/mock/gomock" - packet "github.com/topfreegames/pitaya/v2/conn/packet" + packet "github.com/topfreegames/pitaya/v3/pkg/conn/packet" reflect "reflect" ) diff --git a/conn/codec/packet_decoder.go b/pkg/conn/codec/packet_decoder.go similarity index 95% rename from conn/codec/packet_decoder.go rename to pkg/conn/codec/packet_decoder.go index 9f85a60f..aa7b1a5d 100644 --- a/conn/codec/packet_decoder.go +++ b/pkg/conn/codec/packet_decoder.go @@ -20,7 +20,7 @@ package codec -import "github.com/topfreegames/pitaya/v2/conn/packet" +import "github.com/topfreegames/pitaya/v3/pkg/conn/packet" // PacketDecoder interface type PacketDecoder interface { diff --git a/conn/codec/packet_encoder.go b/pkg/conn/codec/packet_encoder.go similarity index 95% rename from conn/codec/packet_encoder.go rename to pkg/conn/codec/packet_encoder.go index e2158195..8740d6b4 100644 --- a/conn/codec/packet_encoder.go +++ b/pkg/conn/codec/packet_encoder.go @@ -20,7 +20,7 @@ package codec -import "github.com/topfreegames/pitaya/v2/conn/packet" +import "github.com/topfreegames/pitaya/v3/pkg/conn/packet" // PacketEncoder interface type PacketEncoder interface { diff --git a/conn/codec/pomelo_packet_decoder.go b/pkg/conn/codec/pomelo_packet_decoder.go similarity index 97% rename from conn/codec/pomelo_packet_decoder.go rename to pkg/conn/codec/pomelo_packet_decoder.go index 28378a8c..1e0904da 100644 --- a/conn/codec/pomelo_packet_decoder.go +++ b/pkg/conn/codec/pomelo_packet_decoder.go @@ -23,7 +23,7 @@ package codec import ( "bytes" - "github.com/topfreegames/pitaya/v2/conn/packet" + "github.com/topfreegames/pitaya/v3/pkg/conn/packet" ) // PomeloPacketDecoder reads and decodes network data slice following pomelo's protocol diff --git a/conn/codec/pomelo_packet_decoder_test.go b/pkg/conn/codec/pomelo_packet_decoder_test.go similarity index 97% rename from conn/codec/pomelo_packet_decoder_test.go rename to pkg/conn/codec/pomelo_packet_decoder_test.go index 7d3d8771..11a2129d 100644 --- a/conn/codec/pomelo_packet_decoder_test.go +++ b/pkg/conn/codec/pomelo_packet_decoder_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/conn/packet" + "github.com/topfreegames/pitaya/v3/pkg/conn/packet" ) var forwardTables = map[string]struct { diff --git a/conn/codec/pomelo_packet_encoder.go b/pkg/conn/codec/pomelo_packet_encoder.go similarity index 97% rename from conn/codec/pomelo_packet_encoder.go rename to pkg/conn/codec/pomelo_packet_encoder.go index 2551a7c7..2a6a5e95 100644 --- a/conn/codec/pomelo_packet_encoder.go +++ b/pkg/conn/codec/pomelo_packet_encoder.go @@ -21,7 +21,7 @@ package codec import ( - "github.com/topfreegames/pitaya/v2/conn/packet" + "github.com/topfreegames/pitaya/v3/pkg/conn/packet" ) // PomeloPacketEncoder struct diff --git a/conn/codec/pomelo_packet_encoder_test.go b/pkg/conn/codec/pomelo_packet_encoder_test.go similarity index 95% rename from conn/codec/pomelo_packet_encoder_test.go rename to pkg/conn/codec/pomelo_packet_encoder_test.go index 8098ba92..e887de94 100644 --- a/conn/codec/pomelo_packet_encoder_test.go +++ b/pkg/conn/codec/pomelo_packet_encoder_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/conn/packet" + "github.com/topfreegames/pitaya/v3/pkg/conn/packet" ) func helperConcatBytes(packetType packet.Type, length, data []byte) []byte { diff --git a/conn/codec/utils.go b/pkg/conn/codec/utils.go similarity index 93% rename from conn/codec/utils.go rename to pkg/conn/codec/utils.go index fe3f3cbc..30969abd 100644 --- a/conn/codec/utils.go +++ b/pkg/conn/codec/utils.go @@ -1,6 +1,6 @@ package codec -import "github.com/topfreegames/pitaya/v2/conn/packet" +import "github.com/topfreegames/pitaya/v3/pkg/conn/packet" // ParseHeader parses a packet header and returns its dataLen and packetType or an error func ParseHeader(header []byte) (int, packet.Type, error) { diff --git a/conn/message/fixtures/test_invalid_message.golden b/pkg/conn/message/fixtures/test_invalid_message.golden similarity index 100% rename from conn/message/fixtures/test_invalid_message.golden rename to pkg/conn/message/fixtures/test_invalid_message.golden diff --git a/conn/message/fixtures/test_must_gzip.golden b/pkg/conn/message/fixtures/test_must_gzip.golden similarity index 100% rename from conn/message/fixtures/test_must_gzip.golden rename to pkg/conn/message/fixtures/test_must_gzip.golden diff --git a/conn/message/fixtures/test_notify_type.golden b/pkg/conn/message/fixtures/test_notify_type.golden similarity index 100% rename from conn/message/fixtures/test_notify_type.golden rename to pkg/conn/message/fixtures/test_notify_type.golden diff --git a/conn/message/fixtures/test_notify_type_compressed.golden b/pkg/conn/message/fixtures/test_notify_type_compressed.golden similarity index 100% rename from conn/message/fixtures/test_notify_type_compressed.golden rename to pkg/conn/message/fixtures/test_notify_type_compressed.golden diff --git a/conn/message/fixtures/test_push_type.golden b/pkg/conn/message/fixtures/test_push_type.golden similarity index 100% rename from conn/message/fixtures/test_push_type.golden rename to pkg/conn/message/fixtures/test_push_type.golden diff --git a/conn/message/fixtures/test_push_type_compressed.golden b/pkg/conn/message/fixtures/test_push_type_compressed.golden similarity index 100% rename from conn/message/fixtures/test_push_type_compressed.golden rename to pkg/conn/message/fixtures/test_push_type_compressed.golden diff --git a/conn/message/fixtures/test_reponse_type.golden b/pkg/conn/message/fixtures/test_reponse_type.golden similarity index 100% rename from conn/message/fixtures/test_reponse_type.golden rename to pkg/conn/message/fixtures/test_reponse_type.golden diff --git a/conn/message/fixtures/test_reponse_type_with_data.golden b/pkg/conn/message/fixtures/test_reponse_type_with_data.golden similarity index 100% rename from conn/message/fixtures/test_reponse_type_with_data.golden rename to pkg/conn/message/fixtures/test_reponse_type_with_data.golden diff --git a/conn/message/fixtures/test_reponse_type_with_error.golden b/pkg/conn/message/fixtures/test_reponse_type_with_error.golden similarity index 100% rename from conn/message/fixtures/test_reponse_type_with_error.golden rename to pkg/conn/message/fixtures/test_reponse_type_with_error.golden diff --git a/conn/message/fixtures/test_reponse_type_with_id.golden b/pkg/conn/message/fixtures/test_reponse_type_with_id.golden similarity index 100% rename from conn/message/fixtures/test_reponse_type_with_id.golden rename to pkg/conn/message/fixtures/test_reponse_type_with_id.golden diff --git a/conn/message/fixtures/test_request_type.golden b/pkg/conn/message/fixtures/test_request_type.golden similarity index 100% rename from conn/message/fixtures/test_request_type.golden rename to pkg/conn/message/fixtures/test_request_type.golden diff --git a/conn/message/fixtures/test_request_type_compressed.golden b/pkg/conn/message/fixtures/test_request_type_compressed.golden similarity index 100% rename from conn/message/fixtures/test_request_type_compressed.golden rename to pkg/conn/message/fixtures/test_request_type_compressed.golden diff --git a/conn/message/fixtures/test_wrong_type.golden b/pkg/conn/message/fixtures/test_wrong_type.golden similarity index 100% rename from conn/message/fixtures/test_wrong_type.golden rename to pkg/conn/message/fixtures/test_wrong_type.golden diff --git a/conn/message/message.go b/pkg/conn/message/message.go similarity index 100% rename from conn/message/message.go rename to pkg/conn/message/message.go diff --git a/conn/message/message_encoder.go b/pkg/conn/message/message_encoder.go similarity index 98% rename from conn/message/message_encoder.go rename to pkg/conn/message/message_encoder.go index 738fc8f4..991f813a 100644 --- a/conn/message/message_encoder.go +++ b/pkg/conn/message/message_encoder.go @@ -23,7 +23,7 @@ package message import ( "encoding/binary" - "github.com/topfreegames/pitaya/v2/util/compression" + "github.com/topfreegames/pitaya/v3/pkg/util/compression" ) // Encoder interface diff --git a/conn/message/message_test.go b/pkg/conn/message/message_test.go similarity index 99% rename from conn/message/message_test.go rename to pkg/conn/message/message_test.go index 7528870e..f29cd358 100644 --- a/conn/message/message_test.go +++ b/pkg/conn/message/message_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/helpers" + "github.com/topfreegames/pitaya/v3/pkg/helpers" ) var update = flag.Bool("update", false, "update .golden files") diff --git a/conn/message/mocks/message_encoder.go b/pkg/conn/message/mocks/message_encoder.go similarity index 96% rename from conn/message/mocks/message_encoder.go rename to pkg/conn/message/mocks/message_encoder.go index 2c5ce885..daaa7efe 100644 --- a/conn/message/mocks/message_encoder.go +++ b/pkg/conn/message/mocks/message_encoder.go @@ -6,7 +6,7 @@ package mocks import ( gomock "github.com/golang/mock/gomock" - message "github.com/topfreegames/pitaya/v2/conn/message" + message "github.com/topfreegames/pitaya/v3/pkg/conn/message" reflect "reflect" ) diff --git a/conn/packet/constants.go b/pkg/conn/packet/constants.go similarity index 100% rename from conn/packet/constants.go rename to pkg/conn/packet/constants.go diff --git a/conn/packet/packet.go b/pkg/conn/packet/packet.go similarity index 100% rename from conn/packet/packet.go rename to pkg/conn/packet/packet.go diff --git a/conn/packet/packet_test.go b/pkg/conn/packet/packet_test.go similarity index 100% rename from conn/packet/packet_test.go rename to pkg/conn/packet/packet_test.go diff --git a/constants/const.go b/pkg/constants/const.go similarity index 100% rename from constants/const.go rename to pkg/constants/const.go diff --git a/constants/errors.go b/pkg/constants/errors.go similarity index 100% rename from constants/errors.go rename to pkg/constants/errors.go diff --git a/constants/version.go b/pkg/constants/version.go similarity index 100% rename from constants/version.go rename to pkg/constants/version.go diff --git a/context/context.go b/pkg/context/context.go similarity index 98% rename from context/context.go rename to pkg/context/context.go index eb4ad147..e9931559 100644 --- a/context/context.go +++ b/pkg/context/context.go @@ -24,7 +24,7 @@ import ( "context" "encoding/json" - "github.com/topfreegames/pitaya/v2/constants" + "github.com/topfreegames/pitaya/v3/pkg/constants" ) // AddToPropagateCtx adds a key and value that will be propagated through RPC calls diff --git a/context/context_test.go b/pkg/context/context_test.go similarity index 98% rename from context/context_test.go rename to pkg/context/context_test.go index 6adbd783..a30f8698 100644 --- a/context/context_test.go +++ b/pkg/context/context_test.go @@ -30,8 +30,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/helpers" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/helpers" ) var update = flag.Bool("update", false, "update .golden files") diff --git a/context/fixtures/one_element.golden b/pkg/context/fixtures/one_element.golden similarity index 100% rename from context/fixtures/one_element.golden rename to pkg/context/fixtures/one_element.golden diff --git a/context/fixtures/registered_struct.golden b/pkg/context/fixtures/registered_struct.golden similarity index 100% rename from context/fixtures/registered_struct.golden rename to pkg/context/fixtures/registered_struct.golden diff --git a/defaultpipelines/default_struct_validator.go b/pkg/defaultpipelines/default_struct_validator.go similarity index 100% rename from defaultpipelines/default_struct_validator.go rename to pkg/defaultpipelines/default_struct_validator.go diff --git a/defaultpipelines/default_struct_validator_test.go b/pkg/defaultpipelines/default_struct_validator_test.go similarity index 100% rename from defaultpipelines/default_struct_validator_test.go rename to pkg/defaultpipelines/default_struct_validator_test.go diff --git a/defaultpipelines/struct_validator.go b/pkg/defaultpipelines/struct_validator.go similarity index 100% rename from defaultpipelines/struct_validator.go rename to pkg/defaultpipelines/struct_validator.go diff --git a/docgenerator/descriptors.go b/pkg/docgenerator/descriptors.go similarity index 95% rename from docgenerator/descriptors.go rename to pkg/docgenerator/descriptors.go index 71ffed07..722b997e 100644 --- a/docgenerator/descriptors.go +++ b/pkg/docgenerator/descriptors.go @@ -5,7 +5,7 @@ import ( "strings" "github.com/golang/protobuf/proto" - "github.com/topfreegames/pitaya/v2/constants" + "github.com/topfreegames/pitaya/v3/pkg/constants" ) // ProtoDescriptors returns the descriptor for a given message name or .proto file diff --git a/docgenerator/descriptors_test.go b/pkg/docgenerator/descriptors_test.go similarity index 88% rename from docgenerator/descriptors_test.go rename to pkg/docgenerator/descriptors_test.go index 70177924..864d3251 100644 --- a/docgenerator/descriptors_test.go +++ b/pkg/docgenerator/descriptors_test.go @@ -4,8 +4,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/constants" - _ "github.com/topfreegames/pitaya/v2/protos" + "github.com/topfreegames/pitaya/v3/pkg/constants" + _ "github.com/topfreegames/pitaya/v3/pkg/protos" ) func TestProtoDescriptors(t *testing.T) { diff --git a/docgenerator/generator.go b/pkg/docgenerator/generator.go similarity index 98% rename from docgenerator/generator.go rename to pkg/docgenerator/generator.go index 886121de..952d1e7e 100644 --- a/docgenerator/generator.go +++ b/pkg/docgenerator/generator.go @@ -26,8 +26,8 @@ import ( "strings" "unicode" - "github.com/topfreegames/pitaya/v2/component" - "github.com/topfreegames/pitaya/v2/route" + "github.com/topfreegames/pitaya/v3/pkg/component" + "github.com/topfreegames/pitaya/v3/pkg/route" ) type docs struct { diff --git a/docgenerator/generator_test.go b/pkg/docgenerator/generator_test.go similarity index 98% rename from docgenerator/generator_test.go rename to pkg/docgenerator/generator_test.go index d6fc7358..ffb6803b 100644 --- a/docgenerator/generator_test.go +++ b/pkg/docgenerator/generator_test.go @@ -26,8 +26,8 @@ import ( "time" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/component" - "github.com/topfreegames/pitaya/v2/protos/test" + "github.com/topfreegames/pitaya/v3/pkg/component" + "github.com/topfreegames/pitaya/v3/pkg/protos/test" ) type MyComp struct { diff --git a/errors/errors.go b/pkg/errors/errors.go similarity index 100% rename from errors/errors.go rename to pkg/errors/errors.go diff --git a/errors/errors_test.go b/pkg/errors/errors_test.go similarity index 100% rename from errors/errors_test.go rename to pkg/errors/errors_test.go diff --git a/group.go b/pkg/group.go similarity index 97% rename from group.go rename to pkg/group.go index 585fc971..e9a8e252 100644 --- a/group.go +++ b/pkg/group.go @@ -24,8 +24,8 @@ import ( "context" "time" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/logger" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/logger" ) // Group represents an agglomeration of UIDs which is used to manage diff --git a/group_test.go b/pkg/group_test.go similarity index 98% rename from group_test.go rename to pkg/group_test.go index e0a40fd6..23fcf006 100644 --- a/group_test.go +++ b/pkg/group_test.go @@ -26,9 +26,9 @@ import ( "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/config" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/session/mocks" + "github.com/topfreegames/pitaya/v3/pkg/config" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/session/mocks" ) func createGroupTestApp() Pitaya { diff --git a/groups/etcd_group_service.go b/pkg/groups/etcd_group_service.go similarity index 98% rename from groups/etcd_group_service.go rename to pkg/groups/etcd_group_service.go index 61c9436b..6fed74f7 100644 --- a/groups/etcd_group_service.go +++ b/pkg/groups/etcd_group_service.go @@ -9,9 +9,9 @@ import ( clientv3 "go.etcd.io/etcd/client/v3" "go.etcd.io/etcd/client/v3/namespace" "go.etcd.io/etcd/api/v3/mvccpb" - "github.com/topfreegames/pitaya/v2/config" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/logger" + "github.com/topfreegames/pitaya/v3/pkg/config" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/logger" ) var ( diff --git a/groups/etcd_group_service_test.go b/pkg/groups/etcd_group_service_test.go similarity index 97% rename from groups/etcd_group_service_test.go rename to pkg/groups/etcd_group_service_test.go index abe0bf03..98640a68 100644 --- a/groups/etcd_group_service_test.go +++ b/pkg/groups/etcd_group_service_test.go @@ -23,8 +23,8 @@ package groups import ( "testing" - "github.com/topfreegames/pitaya/v2/config" - "github.com/topfreegames/pitaya/v2/helpers" + "github.com/topfreegames/pitaya/v3/pkg/config" + "github.com/topfreegames/pitaya/v3/pkg/helpers" "go.etcd.io/etcd/tests/v3/integration" ) diff --git a/groups/group_service.go b/pkg/groups/group_service.go similarity index 100% rename from groups/group_service.go rename to pkg/groups/group_service.go diff --git a/groups/group_service_test.go b/pkg/groups/group_service_test.go similarity index 99% rename from groups/group_service_test.go rename to pkg/groups/group_service_test.go index 0e145f9b..b1c83bd3 100644 --- a/groups/group_service_test.go +++ b/pkg/groups/group_service_test.go @@ -27,7 +27,7 @@ import ( "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/constants" + "github.com/topfreegames/pitaya/v3/pkg/constants" ) func testCreateDuplicatedGroup(gs GroupService, t *testing.T) { diff --git a/groups/memory_group_service.go b/pkg/groups/memory_group_service.go similarity index 98% rename from groups/memory_group_service.go rename to pkg/groups/memory_group_service.go index 6cde176b..025944d0 100644 --- a/groups/memory_group_service.go +++ b/pkg/groups/memory_group_service.go @@ -5,8 +5,8 @@ import ( "sync" "time" - "github.com/topfreegames/pitaya/v2/config" - "github.com/topfreegames/pitaya/v2/constants" + "github.com/topfreegames/pitaya/v3/pkg/config" + "github.com/topfreegames/pitaya/v3/pkg/constants" ) var ( diff --git a/groups/memory_group_service_test.go b/pkg/groups/memory_group_service_test.go similarity index 98% rename from groups/memory_group_service_test.go rename to pkg/groups/memory_group_service_test.go index fd47c43b..c822a78c 100644 --- a/groups/memory_group_service_test.go +++ b/pkg/groups/memory_group_service_test.go @@ -25,7 +25,7 @@ import ( "testing" "time" - "github.com/topfreegames/pitaya/v2/config" + "github.com/topfreegames/pitaya/v3/pkg/config" ) var memoryGroupService *MemoryGroupService diff --git a/helpers/helpers.go b/pkg/helpers/helpers.go similarity index 100% rename from helpers/helpers.go rename to pkg/helpers/helpers.go diff --git a/helpers/type_support.go b/pkg/helpers/type_support.go similarity index 100% rename from helpers/type_support.go rename to pkg/helpers/type_support.go diff --git a/interfaces/interfaces.go b/pkg/interfaces/interfaces.go similarity index 100% rename from interfaces/interfaces.go rename to pkg/interfaces/interfaces.go diff --git a/interfaces/mocks/interfaces.go b/pkg/interfaces/mocks/interfaces.go similarity index 100% rename from interfaces/mocks/interfaces.go rename to pkg/interfaces/mocks/interfaces.go diff --git a/kick.go b/pkg/kick.go similarity index 93% rename from kick.go rename to pkg/kick.go index b7cd66ba..a94d0663 100644 --- a/kick.go +++ b/pkg/kick.go @@ -23,9 +23,9 @@ package pitaya import ( "context" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/logger" - "github.com/topfreegames/pitaya/v2/protos" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/logger" + "github.com/topfreegames/pitaya/v3/pkg/protos" ) // SendKickToUsers sends kick to an user array diff --git a/kick_test.go b/pkg/kick_test.go similarity index 94% rename from kick_test.go rename to pkg/kick_test.go index be44c9fd..ae150d53 100644 --- a/kick_test.go +++ b/pkg/kick_test.go @@ -27,11 +27,11 @@ import ( "github.com/golang/mock/gomock" "github.com/google/uuid" "github.com/stretchr/testify/assert" - clustermocks "github.com/topfreegames/pitaya/v2/cluster/mocks" - "github.com/topfreegames/pitaya/v2/config" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/protos" - sessionmocks "github.com/topfreegames/pitaya/v2/session/mocks" + clustermocks "github.com/topfreegames/pitaya/v3/pkg/cluster/mocks" + "github.com/topfreegames/pitaya/v3/pkg/config" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/protos" + sessionmocks "github.com/topfreegames/pitaya/v3/pkg/session/mocks" ) func TestSendKickToUsersLocalSession(t *testing.T) { diff --git a/logger/interfaces/interfaces.go b/pkg/logger/interfaces/interfaces.go similarity index 100% rename from logger/interfaces/interfaces.go rename to pkg/logger/interfaces/interfaces.go diff --git a/logger/logger.go b/pkg/logger/logger.go similarity index 92% rename from logger/logger.go rename to pkg/logger/logger.go index 3732df82..b30a4d27 100644 --- a/logger/logger.go +++ b/pkg/logger/logger.go @@ -22,8 +22,8 @@ package logger import ( "github.com/sirupsen/logrus" - "github.com/topfreegames/pitaya/v2/logger/interfaces" - logruswrapper "github.com/topfreegames/pitaya/v2/logger/logrus" + "github.com/topfreegames/pitaya/v3/pkg/logger/interfaces" + logruswrapper "github.com/topfreegames/pitaya/v3/pkg/logger/logrus" ) // Log is the default logger diff --git a/logger/logger_test.go b/pkg/logger/logger_test.go similarity index 95% rename from logger/logger_test.go rename to pkg/logger/logger_test.go index 28d35774..69b0a898 100644 --- a/logger/logger_test.go +++ b/pkg/logger/logger_test.go @@ -24,7 +24,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - logruswrapper "github.com/topfreegames/pitaya/v2/logger/logrus" + logruswrapper "github.com/topfreegames/pitaya/v3/pkg/logger/logrus" ) func TestInitLogger(t *testing.T) { diff --git a/logger/logrus/logrus.go b/pkg/logger/logrus/logrus.go similarity index 96% rename from logger/logrus/logrus.go rename to pkg/logger/logrus/logrus.go index 6f9d0cc4..6d4408af 100644 --- a/logger/logrus/logrus.go +++ b/pkg/logger/logrus/logrus.go @@ -2,7 +2,7 @@ package logrus import ( "github.com/sirupsen/logrus" - "github.com/topfreegames/pitaya/v2/logger/interfaces" + "github.com/topfreegames/pitaya/v3/pkg/logger/interfaces" ) type logrusImpl struct { diff --git a/logger/test/test.go b/pkg/logger/test/test.go similarity index 72% rename from logger/test/test.go rename to pkg/logger/test/test.go index 0eb36a29..e4d922f3 100644 --- a/logger/test/test.go +++ b/pkg/logger/test/test.go @@ -2,8 +2,8 @@ package test import ( tests "github.com/sirupsen/logrus/hooks/test" - "github.com/topfreegames/pitaya/v2/logger/interfaces" - lwrapper "github.com/topfreegames/pitaya/v2/logger/logrus" + "github.com/topfreegames/pitaya/v3/pkg/logger/interfaces" + lwrapper "github.com/topfreegames/pitaya/v3/pkg/logger/logrus" "io" ) diff --git a/metrics/constants.go b/pkg/metrics/constants.go similarity index 100% rename from metrics/constants.go rename to pkg/metrics/constants.go diff --git a/metrics/mocks/reporter.go b/pkg/metrics/mocks/reporter.go similarity index 100% rename from metrics/mocks/reporter.go rename to pkg/metrics/mocks/reporter.go diff --git a/metrics/mocks/statsd_reporter.go b/pkg/metrics/mocks/statsd_reporter.go similarity index 100% rename from metrics/mocks/statsd_reporter.go rename to pkg/metrics/mocks/statsd_reporter.go diff --git a/metrics/models/models.go b/pkg/metrics/models/models.go similarity index 100% rename from metrics/models/models.go rename to pkg/metrics/models/models.go diff --git a/metrics/prometheus_reporter.go b/pkg/metrics/prometheus_reporter.go similarity index 98% rename from metrics/prometheus_reporter.go rename to pkg/metrics/prometheus_reporter.go index 1fe26a7c..ba648c19 100644 --- a/metrics/prometheus_reporter.go +++ b/pkg/metrics/prometheus_reporter.go @@ -23,16 +23,16 @@ package metrics import ( "fmt" - "github.com/topfreegames/pitaya/v2/logger" + "github.com/topfreegames/pitaya/v3/pkg/logger" "net/http" "sync" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" - "github.com/topfreegames/pitaya/v2/config" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/metrics/models" + "github.com/topfreegames/pitaya/v3/pkg/config" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/metrics/models" ) var ( diff --git a/metrics/report.go b/pkg/metrics/report.go similarity index 96% rename from metrics/report.go rename to pkg/metrics/report.go index 4791851a..61526a9d 100644 --- a/metrics/report.go +++ b/pkg/metrics/report.go @@ -25,10 +25,10 @@ import ( "runtime" "time" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/errors" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/errors" - pcontext "github.com/topfreegames/pitaya/v2/context" + pcontext "github.com/topfreegames/pitaya/v3/pkg/context" ) // ReportTimingFromCtx reports the latency from the context diff --git a/metrics/report_test.go b/pkg/metrics/report_test.go similarity index 96% rename from metrics/report_test.go rename to pkg/metrics/report_test.go index e71fa4bc..ffc424d2 100644 --- a/metrics/report_test.go +++ b/pkg/metrics/report_test.go @@ -29,10 +29,10 @@ import ( "github.com/golang/mock/gomock" "github.com/google/uuid" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/constants" - pcontext "github.com/topfreegames/pitaya/v2/context" - e "github.com/topfreegames/pitaya/v2/errors" - "github.com/topfreegames/pitaya/v2/metrics/mocks" + "github.com/topfreegames/pitaya/v3/pkg/constants" + pcontext "github.com/topfreegames/pitaya/v3/pkg/context" + e "github.com/topfreegames/pitaya/v3/pkg/errors" + "github.com/topfreegames/pitaya/v3/pkg/metrics/mocks" ) func TestReportTimingFromCtx(t *testing.T) { diff --git a/metrics/reporter_interfaces.go b/pkg/metrics/reporter_interfaces.go similarity index 100% rename from metrics/reporter_interfaces.go rename to pkg/metrics/reporter_interfaces.go diff --git a/metrics/statsd_reporter.go b/pkg/metrics/statsd_reporter.go similarity index 96% rename from metrics/statsd_reporter.go rename to pkg/metrics/statsd_reporter.go index a5f5d907..373551d0 100644 --- a/metrics/statsd_reporter.go +++ b/pkg/metrics/statsd_reporter.go @@ -23,11 +23,11 @@ package metrics import ( "fmt" - "github.com/topfreegames/pitaya/v2/constants" + "github.com/topfreegames/pitaya/v3/pkg/constants" "github.com/DataDog/datadog-go/statsd" - "github.com/topfreegames/pitaya/v2/config" - "github.com/topfreegames/pitaya/v2/logger" + "github.com/topfreegames/pitaya/v3/pkg/config" + "github.com/topfreegames/pitaya/v3/pkg/logger" ) // Client is the interface to required dogstatsd functions diff --git a/metrics/statsd_reporter_test.go b/pkg/metrics/statsd_reporter_test.go similarity index 98% rename from metrics/statsd_reporter_test.go rename to pkg/metrics/statsd_reporter_test.go index 03dd2e71..5df4e1e2 100644 --- a/metrics/statsd_reporter_test.go +++ b/pkg/metrics/statsd_reporter_test.go @@ -29,8 +29,8 @@ import ( "github.com/golang/mock/gomock" "github.com/google/uuid" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/config" - metricsmocks "github.com/topfreegames/pitaya/v2/metrics/mocks" + "github.com/topfreegames/pitaya/v3/pkg/config" + metricsmocks "github.com/topfreegames/pitaya/v3/pkg/metrics/mocks" ) func TestNewStatsdReporter(t *testing.T) { diff --git a/mocks/acceptor.go b/pkg/mocks/acceptor.go similarity index 99% rename from mocks/acceptor.go rename to pkg/mocks/acceptor.go index 788b88e6..81c2bfff 100644 --- a/mocks/acceptor.go +++ b/pkg/mocks/acceptor.go @@ -10,7 +10,7 @@ import ( time "time" gomock "github.com/golang/mock/gomock" - acceptor "github.com/topfreegames/pitaya/v2/acceptor" + acceptor "github.com/topfreegames/pitaya/v3/pkg/acceptor" ) // MockPlayerConn is a mock of PlayerConn interface. diff --git a/mocks/app.go b/pkg/mocks/app.go similarity index 98% rename from mocks/app.go rename to pkg/mocks/app.go index ed98eafc..de2fb950 100644 --- a/mocks/app.go +++ b/pkg/mocks/app.go @@ -10,14 +10,14 @@ import ( time "time" gomock "github.com/golang/mock/gomock" - cluster "github.com/topfreegames/pitaya/v2/cluster" - component "github.com/topfreegames/pitaya/v2/component" - config "github.com/topfreegames/pitaya/v2/config" - interfaces "github.com/topfreegames/pitaya/v2/interfaces" - metrics "github.com/topfreegames/pitaya/v2/metrics" - router "github.com/topfreegames/pitaya/v2/router" - session "github.com/topfreegames/pitaya/v2/session" - worker "github.com/topfreegames/pitaya/v2/worker" + cluster "github.com/topfreegames/pitaya/v3/pkg/cluster" + component "github.com/topfreegames/pitaya/v3/pkg/component" + config "github.com/topfreegames/pitaya/v3/pkg/config" + interfaces "github.com/topfreegames/pitaya/v3/pkg/interfaces" + metrics "github.com/topfreegames/pitaya/v3/pkg/metrics" + router "github.com/topfreegames/pitaya/v3/pkg/router" + session "github.com/topfreegames/pitaya/v3/pkg/session" + worker "github.com/topfreegames/pitaya/v3/pkg/worker" protoiface "google.golang.org/protobuf/runtime/protoiface" ) diff --git a/module.go b/pkg/module.go similarity index 97% rename from module.go rename to pkg/module.go index a19f6f74..9055f0ad 100644 --- a/module.go +++ b/pkg/module.go @@ -23,8 +23,8 @@ package pitaya import ( "fmt" - "github.com/topfreegames/pitaya/v2/interfaces" - "github.com/topfreegames/pitaya/v2/logger" + "github.com/topfreegames/pitaya/v3/pkg/interfaces" + "github.com/topfreegames/pitaya/v3/pkg/logger" ) type moduleWrapper struct { diff --git a/module_test.go b/pkg/module_test.go similarity index 97% rename from module_test.go rename to pkg/module_test.go index 64cb5680..f402c935 100644 --- a/module_test.go +++ b/pkg/module_test.go @@ -24,8 +24,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/component" - "github.com/topfreegames/pitaya/v2/config" + "github.com/topfreegames/pitaya/v3/pkg/component" + "github.com/topfreegames/pitaya/v3/pkg/config" ) type MyMod struct { diff --git a/modules/api_docs_gen.go b/pkg/modules/api_docs_gen.go similarity index 94% rename from modules/api_docs_gen.go rename to pkg/modules/api_docs_gen.go index 74e4e313..b48a1207 100644 --- a/modules/api_docs_gen.go +++ b/pkg/modules/api_docs_gen.go @@ -21,8 +21,8 @@ package modules import ( - "github.com/topfreegames/pitaya/v2/component" - "github.com/topfreegames/pitaya/v2/logger" + "github.com/topfreegames/pitaya/v3/pkg/component" + "github.com/topfreegames/pitaya/v3/pkg/logger" ) // APIDocsGen is a pitaya module that generates api docs for pitaya servers diff --git a/modules/base.go b/pkg/modules/base.go similarity index 100% rename from modules/base.go rename to pkg/modules/base.go diff --git a/modules/binary.go b/pkg/modules/binary.go similarity index 96% rename from modules/binary.go rename to pkg/modules/binary.go index d60b0832..190699e4 100644 --- a/modules/binary.go +++ b/pkg/modules/binary.go @@ -27,8 +27,8 @@ import ( "syscall" "time" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/logger" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/logger" ) // Binary is a pitaya module that starts a binary as a child process and diff --git a/modules/binary_test.go b/pkg/modules/binary_test.go similarity index 100% rename from modules/binary_test.go rename to pkg/modules/binary_test.go diff --git a/modules/binary_windows.go b/pkg/modules/binary_windows.go similarity index 97% rename from modules/binary_windows.go rename to pkg/modules/binary_windows.go index 17b1d13d..aa61913e 100644 --- a/modules/binary_windows.go +++ b/pkg/modules/binary_windows.go @@ -28,8 +28,8 @@ import ( "syscall" "time" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/logger" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/logger" ) // Binary is a pitaya module that starts a binary as a child process and diff --git a/modules/binding_storage.go b/pkg/modules/binding_storage.go similarity index 95% rename from modules/binding_storage.go rename to pkg/modules/binding_storage.go index c68eb2cc..8d897c12 100644 --- a/modules/binding_storage.go +++ b/pkg/modules/binding_storage.go @@ -27,11 +27,11 @@ import ( clientv3 "go.etcd.io/etcd/client/v3" "go.etcd.io/etcd/client/v3/namespace" - "github.com/topfreegames/pitaya/v2/cluster" - "github.com/topfreegames/pitaya/v2/config" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/logger" - "github.com/topfreegames/pitaya/v2/session" + "github.com/topfreegames/pitaya/v3/pkg/cluster" + "github.com/topfreegames/pitaya/v3/pkg/config" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/logger" + "github.com/topfreegames/pitaya/v3/pkg/session" ) // ETCDBindingStorage module that uses etcd to keep in which frontend server each user is bound diff --git a/modules/unique_session.go b/pkg/modules/unique_session.go similarity index 96% rename from modules/unique_session.go rename to pkg/modules/unique_session.go index ad681e2a..91357db9 100644 --- a/modules/unique_session.go +++ b/pkg/modules/unique_session.go @@ -23,8 +23,8 @@ package modules import ( "context" - "github.com/topfreegames/pitaya/v2/cluster" - "github.com/topfreegames/pitaya/v2/session" + "github.com/topfreegames/pitaya/v3/pkg/cluster" + "github.com/topfreegames/pitaya/v3/pkg/session" ) // UniqueSession module watches for sessions using the same UID and kicks them diff --git a/networkentity/mocks/networkentity.go b/pkg/networkentity/mocks/networkentity.go similarity index 98% rename from networkentity/mocks/networkentity.go rename to pkg/networkentity/mocks/networkentity.go index f30c28d9..ccbc19c0 100644 --- a/networkentity/mocks/networkentity.go +++ b/pkg/networkentity/mocks/networkentity.go @@ -10,7 +10,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - protos "github.com/topfreegames/pitaya/v2/protos" + protos "github.com/topfreegames/pitaya/v3/pkg/protos" ) // MockNetworkEntity is a mock of NetworkEntity interface. diff --git a/networkentity/networkentity.go b/pkg/networkentity/networkentity.go similarity index 90% rename from networkentity/networkentity.go rename to pkg/networkentity/networkentity.go index eed4cadf..84aced9c 100644 --- a/networkentity/networkentity.go +++ b/pkg/networkentity/networkentity.go @@ -4,7 +4,7 @@ import ( "context" "net" - "github.com/topfreegames/pitaya/v2/protos" + "github.com/topfreegames/pitaya/v3/pkg/protos" ) // NetworkEntity represent low-level network instance diff --git a/pipeline/pipeline.go b/pkg/pipeline/pipeline.go similarity index 98% rename from pipeline/pipeline.go rename to pkg/pipeline/pipeline.go index e1c580d7..8f2a2b8c 100644 --- a/pipeline/pipeline.go +++ b/pkg/pipeline/pipeline.go @@ -23,7 +23,7 @@ package pipeline import ( "context" - "github.com/topfreegames/pitaya/v2/logger" + "github.com/topfreegames/pitaya/v3/pkg/logger" ) type ( diff --git a/pipeline/pipeline_test.go b/pkg/pipeline/pipeline_test.go similarity index 100% rename from pipeline/pipeline_test.go rename to pkg/pipeline/pipeline_test.go diff --git a/protos/bind.pb.go b/pkg/protos/bind.pb.go similarity index 100% rename from protos/bind.pb.go rename to pkg/protos/bind.pb.go diff --git a/protos/doc.pb.go b/pkg/protos/doc.pb.go similarity index 100% rename from protos/doc.pb.go rename to pkg/protos/doc.pb.go diff --git a/protos/docmsg.pb.go b/pkg/protos/docmsg.pb.go similarity index 100% rename from protos/docmsg.pb.go rename to pkg/protos/docmsg.pb.go diff --git a/protos/error.pb.go b/pkg/protos/error.pb.go similarity index 100% rename from protos/error.pb.go rename to pkg/protos/error.pb.go diff --git a/protos/kick.pb.go b/pkg/protos/kick.pb.go similarity index 100% rename from protos/kick.pb.go rename to pkg/protos/kick.pb.go diff --git a/protos/mocks/pitaya.go b/pkg/protos/mocks/pitaya.go similarity index 99% rename from protos/mocks/pitaya.go rename to pkg/protos/mocks/pitaya.go index be86d376..052f963d 100644 --- a/protos/mocks/pitaya.go +++ b/pkg/protos/mocks/pitaya.go @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - protos "github.com/topfreegames/pitaya/v2/protos" + protos "github.com/topfreegames/pitaya/v3/pkg/protos" context "golang.org/x/net/context" grpc "google.golang.org/grpc" ) diff --git a/protos/msg.pb.go b/pkg/protos/msg.pb.go similarity index 100% rename from protos/msg.pb.go rename to pkg/protos/msg.pb.go diff --git a/protos/pitaya.pb.go b/pkg/protos/pitaya.pb.go similarity index 100% rename from protos/pitaya.pb.go rename to pkg/protos/pitaya.pb.go diff --git a/protos/protodescriptor.pb.go b/pkg/protos/protodescriptor.pb.go similarity index 100% rename from protos/protodescriptor.pb.go rename to pkg/protos/protodescriptor.pb.go diff --git a/protos/push.pb.go b/pkg/protos/push.pb.go similarity index 100% rename from protos/push.pb.go rename to pkg/protos/push.pb.go diff --git a/protos/request.pb.go b/pkg/protos/request.pb.go similarity index 100% rename from protos/request.pb.go rename to pkg/protos/request.pb.go diff --git a/protos/response.pb.go b/pkg/protos/response.pb.go similarity index 100% rename from protos/response.pb.go rename to pkg/protos/response.pb.go diff --git a/protos/session.pb.go b/pkg/protos/session.pb.go similarity index 100% rename from protos/session.pb.go rename to pkg/protos/session.pb.go diff --git a/protos/test/somestruct.pb.go b/pkg/protos/test/somestruct.pb.go similarity index 100% rename from protos/test/somestruct.pb.go rename to pkg/protos/test/somestruct.pb.go diff --git a/protos/test/testrequest.pb.go b/pkg/protos/test/testrequest.pb.go similarity index 100% rename from protos/test/testrequest.pb.go rename to pkg/protos/test/testrequest.pb.go diff --git a/protos/test/testresponse.pb.go b/pkg/protos/test/testresponse.pb.go similarity index 100% rename from protos/test/testresponse.pb.go rename to pkg/protos/test/testresponse.pb.go diff --git a/push.go b/pkg/push.go similarity index 91% rename from push.go rename to pkg/push.go index e9049dd9..fbfd1c7a 100644 --- a/push.go +++ b/pkg/push.go @@ -21,11 +21,11 @@ package pitaya import ( - "github.com/topfreegames/pitaya/v2/cluster" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/logger" - "github.com/topfreegames/pitaya/v2/protos" - "github.com/topfreegames/pitaya/v2/util" + "github.com/topfreegames/pitaya/v3/pkg/cluster" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/logger" + "github.com/topfreegames/pitaya/v3/pkg/protos" + "github.com/topfreegames/pitaya/v3/pkg/util" ) // SendPushToUsers sends a message to the given list of users diff --git a/push_test.go b/pkg/push_test.go similarity index 93% rename from push_test.go rename to pkg/push_test.go index d41eff5f..0014a8ef 100644 --- a/push_test.go +++ b/pkg/push_test.go @@ -27,12 +27,12 @@ import ( "github.com/golang/mock/gomock" "github.com/google/uuid" "github.com/stretchr/testify/assert" - clustermocks "github.com/topfreegames/pitaya/v2/cluster/mocks" - "github.com/topfreegames/pitaya/v2/config" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/protos" - serializemocks "github.com/topfreegames/pitaya/v2/serialize/mocks" - sessionmocks "github.com/topfreegames/pitaya/v2/session/mocks" + clustermocks "github.com/topfreegames/pitaya/v3/pkg/cluster/mocks" + "github.com/topfreegames/pitaya/v3/pkg/config" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/protos" + serializemocks "github.com/topfreegames/pitaya/v3/pkg/serialize/mocks" + sessionmocks "github.com/topfreegames/pitaya/v3/pkg/session/mocks" ) type someStruct struct { diff --git a/remote/sys.go b/pkg/remote/sys.go similarity index 92% rename from remote/sys.go rename to pkg/remote/sys.go index b757eb7c..94f7eb5f 100644 --- a/remote/sys.go +++ b/pkg/remote/sys.go @@ -23,10 +23,10 @@ package remote import ( "context" - "github.com/topfreegames/pitaya/v2/component" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/protos" - "github.com/topfreegames/pitaya/v2/session" + "github.com/topfreegames/pitaya/v3/pkg/component" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/protos" + "github.com/topfreegames/pitaya/v3/pkg/session" ) // Sys contains logic for handling sys remotes diff --git a/remote/sys_test.go b/pkg/remote/sys_test.go similarity index 97% rename from remote/sys_test.go rename to pkg/remote/sys_test.go index 27b8813f..9e4a65ba 100644 --- a/remote/sys_test.go +++ b/pkg/remote/sys_test.go @@ -27,9 +27,9 @@ import ( "github.com/golang/mock/gomock" "github.com/google/uuid" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/protos" - "github.com/topfreegames/pitaya/v2/session/mocks" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/protos" + "github.com/topfreegames/pitaya/v3/pkg/session/mocks" ) func TestBindSession(t *testing.T) { diff --git a/reporters.go b/pkg/reporters.go similarity index 84% rename from reporters.go rename to pkg/reporters.go index 20533f98..fff6ea6f 100644 --- a/reporters.go +++ b/pkg/reporters.go @@ -1,10 +1,10 @@ package pitaya import ( - "github.com/topfreegames/pitaya/v2/config" - "github.com/topfreegames/pitaya/v2/logger" - "github.com/topfreegames/pitaya/v2/metrics" - "github.com/topfreegames/pitaya/v2/metrics/models" + "github.com/topfreegames/pitaya/v3/pkg/config" + "github.com/topfreegames/pitaya/v3/pkg/logger" + "github.com/topfreegames/pitaya/v3/pkg/metrics" + "github.com/topfreegames/pitaya/v3/pkg/metrics/models" ) // CreatePrometheusReporter create a Prometheus reporter instance diff --git a/route/route.go b/pkg/route/route.go similarity index 97% rename from route/route.go rename to pkg/route/route.go index 63555a9b..88b86a30 100644 --- a/route/route.go +++ b/pkg/route/route.go @@ -25,7 +25,7 @@ import ( "fmt" "strings" - "github.com/topfreegames/pitaya/v2/logger" + "github.com/topfreegames/pitaya/v3/pkg/logger" ) var ( diff --git a/route/route_test.go b/pkg/route/route_test.go similarity index 100% rename from route/route_test.go rename to pkg/route/route_test.go diff --git a/router/router.go b/pkg/router/router.go similarity index 91% rename from router/router.go rename to pkg/router/router.go index 9f9f4087..eb1bcb3f 100644 --- a/router/router.go +++ b/pkg/router/router.go @@ -25,12 +25,12 @@ import ( "math/rand" "time" - "github.com/topfreegames/pitaya/v2/cluster" - "github.com/topfreegames/pitaya/v2/conn/message" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/logger" - "github.com/topfreegames/pitaya/v2/protos" - "github.com/topfreegames/pitaya/v2/route" + "github.com/topfreegames/pitaya/v3/pkg/cluster" + "github.com/topfreegames/pitaya/v3/pkg/conn/message" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/logger" + "github.com/topfreegames/pitaya/v3/pkg/protos" + "github.com/topfreegames/pitaya/v3/pkg/route" ) // Router struct diff --git a/router/router_test.go b/pkg/router/router_test.go similarity index 90% rename from router/router_test.go rename to pkg/router/router_test.go index b8ade8f2..e5c17ab2 100644 --- a/router/router_test.go +++ b/pkg/router/router_test.go @@ -7,11 +7,11 @@ import ( "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/cluster" - "github.com/topfreegames/pitaya/v2/cluster/mocks" - "github.com/topfreegames/pitaya/v2/conn/message" - "github.com/topfreegames/pitaya/v2/protos" - "github.com/topfreegames/pitaya/v2/route" + "github.com/topfreegames/pitaya/v3/pkg/cluster" + "github.com/topfreegames/pitaya/v3/pkg/cluster/mocks" + "github.com/topfreegames/pitaya/v3/pkg/conn/message" + "github.com/topfreegames/pitaya/v3/pkg/protos" + "github.com/topfreegames/pitaya/v3/pkg/route" ) var ( diff --git a/rpc.go b/pkg/rpc.go similarity index 95% rename from rpc.go rename to pkg/rpc.go index cce98b6b..42e88c72 100644 --- a/rpc.go +++ b/pkg/rpc.go @@ -25,9 +25,9 @@ import ( "reflect" "github.com/golang/protobuf/proto" - "github.com/topfreegames/pitaya/v2/config" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/route" + "github.com/topfreegames/pitaya/v3/pkg/config" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/route" ) // RPC calls a method in a different server diff --git a/rpc_test.go b/pkg/rpc_test.go similarity index 83% rename from rpc_test.go rename to pkg/rpc_test.go index aa23d050..898c6441 100644 --- a/rpc_test.go +++ b/pkg/rpc_test.go @@ -27,20 +27,20 @@ import ( "github.com/golang/mock/gomock" "github.com/golang/protobuf/proto" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/cluster" - clustermocks "github.com/topfreegames/pitaya/v2/cluster/mocks" - "github.com/topfreegames/pitaya/v2/config" - "github.com/topfreegames/pitaya/v2/conn/codec" - "github.com/topfreegames/pitaya/v2/conn/message" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/pipeline" - "github.com/topfreegames/pitaya/v2/protos" - "github.com/topfreegames/pitaya/v2/protos/test" - "github.com/topfreegames/pitaya/v2/route" - "github.com/topfreegames/pitaya/v2/router" - serializemocks "github.com/topfreegames/pitaya/v2/serialize/mocks" - "github.com/topfreegames/pitaya/v2/service" - sessionmocks "github.com/topfreegames/pitaya/v2/session/mocks" + "github.com/topfreegames/pitaya/v3/pkg/cluster" + clustermocks "github.com/topfreegames/pitaya/v3/pkg/cluster/mocks" + "github.com/topfreegames/pitaya/v3/pkg/config" + "github.com/topfreegames/pitaya/v3/pkg/conn/codec" + "github.com/topfreegames/pitaya/v3/pkg/conn/message" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/pipeline" + "github.com/topfreegames/pitaya/v3/pkg/protos" + "github.com/topfreegames/pitaya/v3/pkg/protos/test" + "github.com/topfreegames/pitaya/v3/pkg/route" + "github.com/topfreegames/pitaya/v3/pkg/router" + serializemocks "github.com/topfreegames/pitaya/v3/pkg/serialize/mocks" + "github.com/topfreegames/pitaya/v3/pkg/service" + sessionmocks "github.com/topfreegames/pitaya/v3/pkg/session/mocks" ) func TestDoSendRPCNotInitialized(t *testing.T) { diff --git a/serialize/json/json.go b/pkg/serialize/json/json.go similarity index 100% rename from serialize/json/json.go rename to pkg/serialize/json/json.go diff --git a/serialize/json/json_test.go b/pkg/serialize/json/json_test.go similarity index 100% rename from serialize/json/json_test.go rename to pkg/serialize/json/json_test.go diff --git a/serialize/mocks/serializer.go b/pkg/serialize/mocks/serializer.go similarity index 100% rename from serialize/mocks/serializer.go rename to pkg/serialize/mocks/serializer.go diff --git a/serialize/protobuf/fixtures/TestMarshal/test_ok.golden b/pkg/serialize/protobuf/fixtures/TestMarshal/test_ok.golden similarity index 100% rename from serialize/protobuf/fixtures/TestMarshal/test_ok.golden rename to pkg/serialize/protobuf/fixtures/TestMarshal/test_ok.golden diff --git a/serialize/protobuf/protobuf.go b/pkg/serialize/protobuf/protobuf.go similarity index 97% rename from serialize/protobuf/protobuf.go rename to pkg/serialize/protobuf/protobuf.go index 3a350da5..6d6e90f1 100644 --- a/serialize/protobuf/protobuf.go +++ b/pkg/serialize/protobuf/protobuf.go @@ -22,7 +22,7 @@ package protobuf import ( "github.com/golang/protobuf/proto" - "github.com/topfreegames/pitaya/v2/constants" + "github.com/topfreegames/pitaya/v3/pkg/constants" ) // Serializer implements the serialize.Serializer interface diff --git a/serialize/protobuf/protobuf_test.go b/pkg/serialize/protobuf/protobuf_test.go similarity index 95% rename from serialize/protobuf/protobuf_test.go rename to pkg/serialize/protobuf/protobuf_test.go index 5aab8653..614e0e7f 100644 --- a/serialize/protobuf/protobuf_test.go +++ b/pkg/serialize/protobuf/protobuf_test.go @@ -26,9 +26,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/helpers" - "github.com/topfreegames/pitaya/v2/protos" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/helpers" + "github.com/topfreegames/pitaya/v3/pkg/protos" ) var update = flag.Bool("update", false, "update .golden files") diff --git a/serialize/serializer.go b/pkg/serialize/serializer.go similarity index 95% rename from serialize/serializer.go rename to pkg/serialize/serializer.go index 3222ef55..8288028f 100644 --- a/serialize/serializer.go +++ b/pkg/serialize/serializer.go @@ -23,8 +23,8 @@ package serialize import ( "errors" - "github.com/topfreegames/pitaya/v2/serialize/json" - "github.com/topfreegames/pitaya/v2/serialize/protobuf" + "github.com/topfreegames/pitaya/v3/pkg/serialize/json" + "github.com/topfreegames/pitaya/v3/pkg/serialize/protobuf" ) const ( diff --git a/service/base_service.go b/pkg/service/base_service.go similarity index 77% rename from service/base_service.go rename to pkg/service/base_service.go index 83481068..09b37f06 100644 --- a/service/base_service.go +++ b/pkg/service/base_service.go @@ -1,6 +1,6 @@ package service -import "github.com/topfreegames/pitaya/v2/pipeline" +import "github.com/topfreegames/pitaya/v3/pkg/pipeline" type baseService struct { handlerHooks *pipeline.HandlerHooks diff --git a/service/fixtures/unmarshal_remote_test_1.golden b/pkg/service/fixtures/unmarshal_remote_test_1.golden similarity index 100% rename from service/fixtures/unmarshal_remote_test_1.golden rename to pkg/service/fixtures/unmarshal_remote_test_1.golden diff --git a/service/fixtures/unmarshal_remote_test_2.golden b/pkg/service/fixtures/unmarshal_remote_test_2.golden similarity index 100% rename from service/fixtures/unmarshal_remote_test_2.golden rename to pkg/service/fixtures/unmarshal_remote_test_2.golden diff --git a/service/fixtures/unmarshal_remote_test_3.golden b/pkg/service/fixtures/unmarshal_remote_test_3.golden similarity index 100% rename from service/fixtures/unmarshal_remote_test_3.golden rename to pkg/service/fixtures/unmarshal_remote_test_3.golden diff --git a/service/handler.go b/pkg/service/handler.go similarity index 92% rename from service/handler.go rename to pkg/service/handler.go index 994317c9..1553dd52 100644 --- a/service/handler.go +++ b/pkg/service/handler.go @@ -32,26 +32,26 @@ import ( "github.com/nats-io/nuid" "go.opentelemetry.io/otel/attribute" - "github.com/topfreegames/pitaya/v2/acceptor" - "github.com/topfreegames/pitaya/v2/pipeline" - - "github.com/topfreegames/pitaya/v2/agent" - "github.com/topfreegames/pitaya/v2/cluster" - "github.com/topfreegames/pitaya/v2/component" - "github.com/topfreegames/pitaya/v2/conn/codec" - "github.com/topfreegames/pitaya/v2/conn/message" - "github.com/topfreegames/pitaya/v2/conn/packet" - "github.com/topfreegames/pitaya/v2/constants" - pcontext "github.com/topfreegames/pitaya/v2/context" - "github.com/topfreegames/pitaya/v2/docgenerator" - e "github.com/topfreegames/pitaya/v2/errors" - "github.com/topfreegames/pitaya/v2/logger" - "github.com/topfreegames/pitaya/v2/metrics" - "github.com/topfreegames/pitaya/v2/route" - "github.com/topfreegames/pitaya/v2/serialize" - "github.com/topfreegames/pitaya/v2/session" - "github.com/topfreegames/pitaya/v2/timer" - "github.com/topfreegames/pitaya/v2/tracing" + "github.com/topfreegames/pitaya/v3/pkg/acceptor" + "github.com/topfreegames/pitaya/v3/pkg/pipeline" + + "github.com/topfreegames/pitaya/v3/pkg/agent" + "github.com/topfreegames/pitaya/v3/pkg/cluster" + "github.com/topfreegames/pitaya/v3/pkg/component" + "github.com/topfreegames/pitaya/v3/pkg/conn/codec" + "github.com/topfreegames/pitaya/v3/pkg/conn/message" + "github.com/topfreegames/pitaya/v3/pkg/conn/packet" + "github.com/topfreegames/pitaya/v3/pkg/constants" + pcontext "github.com/topfreegames/pitaya/v3/pkg/context" + "github.com/topfreegames/pitaya/v3/pkg/docgenerator" + e "github.com/topfreegames/pitaya/v3/pkg/errors" + "github.com/topfreegames/pitaya/v3/pkg/logger" + "github.com/topfreegames/pitaya/v3/pkg/metrics" + "github.com/topfreegames/pitaya/v3/pkg/route" + "github.com/topfreegames/pitaya/v3/pkg/serialize" + "github.com/topfreegames/pitaya/v3/pkg/session" + "github.com/topfreegames/pitaya/v3/pkg/timer" + "github.com/topfreegames/pitaya/v3/pkg/tracing" ) var ( diff --git a/service/handler_pool.go b/pkg/service/handler_pool.go similarity index 85% rename from service/handler_pool.go rename to pkg/service/handler_pool.go index 58245d84..b73b3d64 100644 --- a/service/handler_pool.go +++ b/pkg/service/handler_pool.go @@ -5,16 +5,16 @@ import ( "fmt" "reflect" - "github.com/topfreegames/pitaya/v2/component" - "github.com/topfreegames/pitaya/v2/conn/message" - "github.com/topfreegames/pitaya/v2/constants" - e "github.com/topfreegames/pitaya/v2/errors" - "github.com/topfreegames/pitaya/v2/logger/interfaces" - "github.com/topfreegames/pitaya/v2/pipeline" - "github.com/topfreegames/pitaya/v2/route" - "github.com/topfreegames/pitaya/v2/serialize" - "github.com/topfreegames/pitaya/v2/session" - "github.com/topfreegames/pitaya/v2/util" + "github.com/topfreegames/pitaya/v3/pkg/component" + "github.com/topfreegames/pitaya/v3/pkg/conn/message" + "github.com/topfreegames/pitaya/v3/pkg/constants" + e "github.com/topfreegames/pitaya/v3/pkg/errors" + "github.com/topfreegames/pitaya/v3/pkg/logger/interfaces" + "github.com/topfreegames/pitaya/v3/pkg/pipeline" + "github.com/topfreegames/pitaya/v3/pkg/route" + "github.com/topfreegames/pitaya/v3/pkg/serialize" + "github.com/topfreegames/pitaya/v3/pkg/session" + "github.com/topfreegames/pitaya/v3/pkg/util" ) // HandlerPool ... diff --git a/service/handler_pool_test.go b/pkg/service/handler_pool_test.go similarity index 94% rename from service/handler_pool_test.go rename to pkg/service/handler_pool_test.go index 67747321..4e4d8e09 100644 --- a/service/handler_pool_test.go +++ b/pkg/service/handler_pool_test.go @@ -30,15 +30,15 @@ import ( "github.com/golang/mock/gomock" "github.com/google/uuid" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/component" - "github.com/topfreegames/pitaya/v2/conn/message" - "github.com/topfreegames/pitaya/v2/constants" - e "github.com/topfreegames/pitaya/v2/errors" - "github.com/topfreegames/pitaya/v2/pipeline" - "github.com/topfreegames/pitaya/v2/protos/test" - "github.com/topfreegames/pitaya/v2/route" - "github.com/topfreegames/pitaya/v2/serialize/mocks" - session_mocks "github.com/topfreegames/pitaya/v2/session/mocks" + "github.com/topfreegames/pitaya/v3/pkg/component" + "github.com/topfreegames/pitaya/v3/pkg/conn/message" + "github.com/topfreegames/pitaya/v3/pkg/constants" + e "github.com/topfreegames/pitaya/v3/pkg/errors" + "github.com/topfreegames/pitaya/v3/pkg/pipeline" + "github.com/topfreegames/pitaya/v3/pkg/protos/test" + "github.com/topfreegames/pitaya/v3/pkg/route" + "github.com/topfreegames/pitaya/v3/pkg/serialize/mocks" + session_mocks "github.com/topfreegames/pitaya/v3/pkg/session/mocks" ) func TestGetHandlerExists(t *testing.T) { diff --git a/service/handler_test.go b/pkg/service/handler_test.go similarity index 93% rename from service/handler_test.go rename to pkg/service/handler_test.go index 98b1e80a..322170d3 100644 --- a/service/handler_test.go +++ b/pkg/service/handler_test.go @@ -31,25 +31,25 @@ import ( "github.com/golang/mock/gomock" "github.com/google/uuid" "github.com/stretchr/testify/assert" - agentmocks "github.com/topfreegames/pitaya/v2/agent/mocks" - "github.com/topfreegames/pitaya/v2/cluster" - "github.com/topfreegames/pitaya/v2/component" - "github.com/topfreegames/pitaya/v2/conn/codec" - "github.com/topfreegames/pitaya/v2/conn/message" - "github.com/topfreegames/pitaya/v2/conn/packet" - "github.com/topfreegames/pitaya/v2/constants" - pcontext "github.com/topfreegames/pitaya/v2/context" - "github.com/topfreegames/pitaya/v2/helpers" - "github.com/topfreegames/pitaya/v2/metrics" - metricsmocks "github.com/topfreegames/pitaya/v2/metrics/mocks" - connmock "github.com/topfreegames/pitaya/v2/mocks" - "github.com/topfreegames/pitaya/v2/pipeline" - "github.com/topfreegames/pitaya/v2/protos" - "github.com/topfreegames/pitaya/v2/route" - "github.com/topfreegames/pitaya/v2/serialize/json" - serializemocks "github.com/topfreegames/pitaya/v2/serialize/mocks" - "github.com/topfreegames/pitaya/v2/session" - "github.com/topfreegames/pitaya/v2/session/mocks" + agentmocks "github.com/topfreegames/pitaya/v3/pkg/agent/mocks" + "github.com/topfreegames/pitaya/v3/pkg/cluster" + "github.com/topfreegames/pitaya/v3/pkg/component" + "github.com/topfreegames/pitaya/v3/pkg/conn/codec" + "github.com/topfreegames/pitaya/v3/pkg/conn/message" + "github.com/topfreegames/pitaya/v3/pkg/conn/packet" + "github.com/topfreegames/pitaya/v3/pkg/constants" + pcontext "github.com/topfreegames/pitaya/v3/pkg/context" + "github.com/topfreegames/pitaya/v3/pkg/helpers" + "github.com/topfreegames/pitaya/v3/pkg/metrics" + metricsmocks "github.com/topfreegames/pitaya/v3/pkg/metrics/mocks" + connmock "github.com/topfreegames/pitaya/v3/pkg/mocks" + "github.com/topfreegames/pitaya/v3/pkg/pipeline" + "github.com/topfreegames/pitaya/v3/pkg/protos" + "github.com/topfreegames/pitaya/v3/pkg/route" + "github.com/topfreegames/pitaya/v3/pkg/serialize/json" + serializemocks "github.com/topfreegames/pitaya/v3/pkg/serialize/mocks" + "github.com/topfreegames/pitaya/v3/pkg/session" + "github.com/topfreegames/pitaya/v3/pkg/session/mocks" ) var ( diff --git a/service/remote.go b/pkg/service/remote.go similarity index 93% rename from service/remote.go rename to pkg/service/remote.go index 200b45c8..d89b15c3 100644 --- a/service/remote.go +++ b/pkg/service/remote.go @@ -29,24 +29,24 @@ import ( "github.com/golang/protobuf/proto" - "github.com/topfreegames/pitaya/v2/agent" - "github.com/topfreegames/pitaya/v2/cluster" - "github.com/topfreegames/pitaya/v2/component" - "github.com/topfreegames/pitaya/v2/conn/codec" - "github.com/topfreegames/pitaya/v2/conn/message" - "github.com/topfreegames/pitaya/v2/constants" - pcontext "github.com/topfreegames/pitaya/v2/context" - "github.com/topfreegames/pitaya/v2/docgenerator" - e "github.com/topfreegames/pitaya/v2/errors" - "github.com/topfreegames/pitaya/v2/logger" - "github.com/topfreegames/pitaya/v2/pipeline" - "github.com/topfreegames/pitaya/v2/protos" - "github.com/topfreegames/pitaya/v2/route" - "github.com/topfreegames/pitaya/v2/router" - "github.com/topfreegames/pitaya/v2/serialize" - "github.com/topfreegames/pitaya/v2/session" - "github.com/topfreegames/pitaya/v2/tracing" - "github.com/topfreegames/pitaya/v2/util" + "github.com/topfreegames/pitaya/v3/pkg/agent" + "github.com/topfreegames/pitaya/v3/pkg/cluster" + "github.com/topfreegames/pitaya/v3/pkg/component" + "github.com/topfreegames/pitaya/v3/pkg/conn/codec" + "github.com/topfreegames/pitaya/v3/pkg/conn/message" + "github.com/topfreegames/pitaya/v3/pkg/constants" + pcontext "github.com/topfreegames/pitaya/v3/pkg/context" + "github.com/topfreegames/pitaya/v3/pkg/docgenerator" + e "github.com/topfreegames/pitaya/v3/pkg/errors" + "github.com/topfreegames/pitaya/v3/pkg/logger" + "github.com/topfreegames/pitaya/v3/pkg/pipeline" + "github.com/topfreegames/pitaya/v3/pkg/protos" + "github.com/topfreegames/pitaya/v3/pkg/route" + "github.com/topfreegames/pitaya/v3/pkg/router" + "github.com/topfreegames/pitaya/v3/pkg/serialize" + "github.com/topfreegames/pitaya/v3/pkg/session" + "github.com/topfreegames/pitaya/v3/pkg/tracing" + "github.com/topfreegames/pitaya/v3/pkg/util" ) // RemoteService struct diff --git a/service/remote_test.go b/pkg/service/remote_test.go similarity index 96% rename from service/remote_test.go rename to pkg/service/remote_test.go index a5920bfe..d344deec 100644 --- a/service/remote_test.go +++ b/pkg/service/remote_test.go @@ -32,23 +32,23 @@ import ( "github.com/golang/protobuf/proto" "github.com/google/uuid" "github.com/stretchr/testify/assert" - agentmocks "github.com/topfreegames/pitaya/v2/agent/mocks" - "github.com/topfreegames/pitaya/v2/cluster" - clustermocks "github.com/topfreegames/pitaya/v2/cluster/mocks" - "github.com/topfreegames/pitaya/v2/component" - "github.com/topfreegames/pitaya/v2/conn/codec" - "github.com/topfreegames/pitaya/v2/conn/message" - messagemocks "github.com/topfreegames/pitaya/v2/conn/message/mocks" - "github.com/topfreegames/pitaya/v2/constants" - e "github.com/topfreegames/pitaya/v2/errors" - "github.com/topfreegames/pitaya/v2/pipeline" - "github.com/topfreegames/pitaya/v2/protos" - "github.com/topfreegames/pitaya/v2/protos/test" - "github.com/topfreegames/pitaya/v2/route" - "github.com/topfreegames/pitaya/v2/router" - serializemocks "github.com/topfreegames/pitaya/v2/serialize/mocks" - "github.com/topfreegames/pitaya/v2/session" - sessionmocks "github.com/topfreegames/pitaya/v2/session/mocks" + agentmocks "github.com/topfreegames/pitaya/v3/pkg/agent/mocks" + "github.com/topfreegames/pitaya/v3/pkg/cluster" + clustermocks "github.com/topfreegames/pitaya/v3/pkg/cluster/mocks" + "github.com/topfreegames/pitaya/v3/pkg/component" + "github.com/topfreegames/pitaya/v3/pkg/conn/codec" + "github.com/topfreegames/pitaya/v3/pkg/conn/message" + messagemocks "github.com/topfreegames/pitaya/v3/pkg/conn/message/mocks" + "github.com/topfreegames/pitaya/v3/pkg/constants" + e "github.com/topfreegames/pitaya/v3/pkg/errors" + "github.com/topfreegames/pitaya/v3/pkg/pipeline" + "github.com/topfreegames/pitaya/v3/pkg/protos" + "github.com/topfreegames/pitaya/v3/pkg/protos/test" + "github.com/topfreegames/pitaya/v3/pkg/route" + "github.com/topfreegames/pitaya/v3/pkg/router" + serializemocks "github.com/topfreegames/pitaya/v3/pkg/serialize/mocks" + "github.com/topfreegames/pitaya/v3/pkg/session" + sessionmocks "github.com/topfreegames/pitaya/v3/pkg/session/mocks" ) const ctxModifiedResponse = "response" diff --git a/service/util.go b/pkg/service/util.go similarity index 88% rename from service/util.go rename to pkg/service/util.go index 3cd95a9c..91bdc19c 100644 --- a/service/util.go +++ b/pkg/service/util.go @@ -26,18 +26,18 @@ import ( "reflect" "github.com/golang/protobuf/proto" - "github.com/topfreegames/pitaya/v2/component" - "github.com/topfreegames/pitaya/v2/conn/message" - "github.com/topfreegames/pitaya/v2/constants" - e "github.com/topfreegames/pitaya/v2/errors" - "github.com/topfreegames/pitaya/v2/logger" - "github.com/topfreegames/pitaya/v2/logger/interfaces" - "github.com/topfreegames/pitaya/v2/pipeline" - "github.com/topfreegames/pitaya/v2/protos" - "github.com/topfreegames/pitaya/v2/route" - "github.com/topfreegames/pitaya/v2/serialize" - "github.com/topfreegames/pitaya/v2/session" - "github.com/topfreegames/pitaya/v2/util" + "github.com/topfreegames/pitaya/v3/pkg/component" + "github.com/topfreegames/pitaya/v3/pkg/conn/message" + "github.com/topfreegames/pitaya/v3/pkg/constants" + e "github.com/topfreegames/pitaya/v3/pkg/errors" + "github.com/topfreegames/pitaya/v3/pkg/logger" + "github.com/topfreegames/pitaya/v3/pkg/logger/interfaces" + "github.com/topfreegames/pitaya/v3/pkg/pipeline" + "github.com/topfreegames/pitaya/v3/pkg/protos" + "github.com/topfreegames/pitaya/v3/pkg/route" + "github.com/topfreegames/pitaya/v3/pkg/serialize" + "github.com/topfreegames/pitaya/v3/pkg/session" + "github.com/topfreegames/pitaya/v3/pkg/util" ) var errInvalidMsg = errors.New("invalid message type provided") diff --git a/service/util_test.go b/pkg/service/util_test.go similarity index 96% rename from service/util_test.go rename to pkg/service/util_test.go index c06e456c..9f90b8d7 100644 --- a/service/util_test.go +++ b/pkg/service/util_test.go @@ -32,13 +32,13 @@ import ( "github.com/golang/protobuf/proto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/topfreegames/pitaya/v2/component" - "github.com/topfreegames/pitaya/v2/conn/message" - "github.com/topfreegames/pitaya/v2/helpers" - "github.com/topfreegames/pitaya/v2/pipeline" - "github.com/topfreegames/pitaya/v2/protos" - "github.com/topfreegames/pitaya/v2/protos/test" - "github.com/topfreegames/pitaya/v2/serialize/mocks" + "github.com/topfreegames/pitaya/v3/pkg/component" + "github.com/topfreegames/pitaya/v3/pkg/conn/message" + "github.com/topfreegames/pitaya/v3/pkg/helpers" + "github.com/topfreegames/pitaya/v3/pkg/pipeline" + "github.com/topfreegames/pitaya/v3/pkg/protos" + "github.com/topfreegames/pitaya/v3/pkg/protos/test" + "github.com/topfreegames/pitaya/v3/pkg/serialize/mocks" ) var update = flag.Bool("update", false, "update .golden files") diff --git a/session/fixtures/testSessionSetData_1.golden b/pkg/session/fixtures/testSessionSetData_1.golden similarity index 100% rename from session/fixtures/testSessionSetData_1.golden rename to pkg/session/fixtures/testSessionSetData_1.golden diff --git a/session/fixtures/testSessionSetData_2.golden b/pkg/session/fixtures/testSessionSetData_2.golden similarity index 100% rename from session/fixtures/testSessionSetData_2.golden rename to pkg/session/fixtures/testSessionSetData_2.golden diff --git a/session/fixtures/testSessionSetData_3.golden b/pkg/session/fixtures/testSessionSetData_3.golden similarity index 100% rename from session/fixtures/testSessionSetData_3.golden rename to pkg/session/fixtures/testSessionSetData_3.golden diff --git a/session/fixtures/testSessionSetData_4.golden b/pkg/session/fixtures/testSessionSetData_4.golden similarity index 100% rename from session/fixtures/testSessionSetData_4.golden rename to pkg/session/fixtures/testSessionSetData_4.golden diff --git a/session/fixtures/testSessionSetData_5.golden b/pkg/session/fixtures/testSessionSetData_5.golden similarity index 100% rename from session/fixtures/testSessionSetData_5.golden rename to pkg/session/fixtures/testSessionSetData_5.golden diff --git a/session/fixtures/testUpdateEncodedData_1.golden b/pkg/session/fixtures/testUpdateEncodedData_1.golden similarity index 100% rename from session/fixtures/testUpdateEncodedData_1.golden rename to pkg/session/fixtures/testUpdateEncodedData_1.golden diff --git a/session/fixtures/testUpdateEncodedData_2.golden b/pkg/session/fixtures/testUpdateEncodedData_2.golden similarity index 100% rename from session/fixtures/testUpdateEncodedData_2.golden rename to pkg/session/fixtures/testUpdateEncodedData_2.golden diff --git a/session/fixtures/testUpdateEncodedData_3.golden b/pkg/session/fixtures/testUpdateEncodedData_3.golden similarity index 100% rename from session/fixtures/testUpdateEncodedData_3.golden rename to pkg/session/fixtures/testUpdateEncodedData_3.golden diff --git a/session/fixtures/testUpdateEncodedData_4.golden b/pkg/session/fixtures/testUpdateEncodedData_4.golden similarity index 100% rename from session/fixtures/testUpdateEncodedData_4.golden rename to pkg/session/fixtures/testUpdateEncodedData_4.golden diff --git a/session/fixtures/testUpdateEncodedData_5.golden b/pkg/session/fixtures/testUpdateEncodedData_5.golden similarity index 100% rename from session/fixtures/testUpdateEncodedData_5.golden rename to pkg/session/fixtures/testUpdateEncodedData_5.golden diff --git a/session/mocks/session.go b/pkg/session/mocks/session.go similarity index 99% rename from session/mocks/session.go rename to pkg/session/mocks/session.go index a5b06b81..dc87d51a 100644 --- a/session/mocks/session.go +++ b/pkg/session/mocks/session.go @@ -11,8 +11,8 @@ import ( gomock "github.com/golang/mock/gomock" nats "github.com/nats-io/nats.go" - networkentity "github.com/topfreegames/pitaya/v2/networkentity" - session "github.com/topfreegames/pitaya/v2/session" + networkentity "github.com/topfreegames/pitaya/v3/pkg/networkentity" + session "github.com/topfreegames/pitaya/v3/pkg/session" ) // MockSession is a mock of Session interface. diff --git a/session/session.go b/pkg/session/session.go similarity index 99% rename from session/session.go rename to pkg/session/session.go index 5d95b141..d8ef4fed 100644 --- a/session/session.go +++ b/pkg/session/session.go @@ -32,10 +32,10 @@ import ( "github.com/golang/protobuf/proto" nats "github.com/nats-io/nats.go" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/logger" - "github.com/topfreegames/pitaya/v2/networkentity" - "github.com/topfreegames/pitaya/v2/protos" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/logger" + "github.com/topfreegames/pitaya/v3/pkg/networkentity" + "github.com/topfreegames/pitaya/v3/pkg/protos" ) type sessionPoolImpl struct { diff --git a/session/session_test.go b/pkg/session/session_test.go similarity index 99% rename from session/session_test.go rename to pkg/session/session_test.go index 6d288317..b3aaf3a3 100644 --- a/session/session_test.go +++ b/pkg/session/session_test.go @@ -36,10 +36,10 @@ import ( "github.com/google/uuid" nats "github.com/nats-io/nats.go" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/helpers" - "github.com/topfreegames/pitaya/v2/networkentity/mocks" - "github.com/topfreegames/pitaya/v2/protos" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/helpers" + "github.com/topfreegames/pitaya/v3/pkg/networkentity/mocks" + "github.com/topfreegames/pitaya/v3/pkg/protos" ) var update = flag.Bool("update", false, "update .golden files") diff --git a/session/static.go b/pkg/session/static.go similarity index 100% rename from session/static.go rename to pkg/session/static.go diff --git a/session/test/static_test.go b/pkg/session/test/static_test.go similarity index 96% rename from session/test/static_test.go rename to pkg/session/test/static_test.go index 8f3f6111..eaf1b3d1 100644 --- a/session/test/static_test.go +++ b/pkg/session/test/static_test.go @@ -6,8 +6,8 @@ import ( "github.com/golang/mock/gomock" "github.com/google/uuid" "github.com/stretchr/testify/require" - "github.com/topfreegames/pitaya/v2/session" - "github.com/topfreegames/pitaya/v2/session/mocks" + "github.com/topfreegames/pitaya/v3/pkg/session" + "github.com/topfreegames/pitaya/v3/pkg/session/mocks" ) func TestStaticGetSessionByUID(t *testing.T) { diff --git a/static.go b/pkg/static.go similarity index 93% rename from static.go rename to pkg/static.go index 1eb06e5c..1e680791 100644 --- a/static.go +++ b/pkg/static.go @@ -26,15 +26,15 @@ import ( "github.com/golang/protobuf/proto" "github.com/spf13/viper" - "github.com/topfreegames/pitaya/v2/cluster" - "github.com/topfreegames/pitaya/v2/component" - "github.com/topfreegames/pitaya/v2/config" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/interfaces" - "github.com/topfreegames/pitaya/v2/metrics" - "github.com/topfreegames/pitaya/v2/router" - "github.com/topfreegames/pitaya/v2/session" - "github.com/topfreegames/pitaya/v2/worker" + "github.com/topfreegames/pitaya/v3/pkg/cluster" + "github.com/topfreegames/pitaya/v3/pkg/component" + "github.com/topfreegames/pitaya/v3/pkg/config" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/interfaces" + "github.com/topfreegames/pitaya/v3/pkg/metrics" + "github.com/topfreegames/pitaya/v3/pkg/router" + "github.com/topfreegames/pitaya/v3/pkg/session" + "github.com/topfreegames/pitaya/v3/pkg/worker" ) var DefaultApp Pitaya diff --git a/static_test.go b/pkg/static_test.go similarity index 97% rename from static_test.go rename to pkg/static_test.go index b935b201..a9dec0dd 100644 --- a/static_test.go +++ b/pkg/static_test.go @@ -23,7 +23,7 @@ package pitaya import ( "context" "errors" - "github.com/topfreegames/pitaya/v2/constants" + "github.com/topfreegames/pitaya/v3/pkg/constants" "testing" "time" @@ -32,16 +32,16 @@ import ( "github.com/google/uuid" "github.com/spf13/viper" "github.com/stretchr/testify/require" - "github.com/topfreegames/pitaya/v2/cluster" - "github.com/topfreegames/pitaya/v2/component" - "github.com/topfreegames/pitaya/v2/config" - "github.com/topfreegames/pitaya/v2/interfaces" - "github.com/topfreegames/pitaya/v2/metrics" - "github.com/topfreegames/pitaya/v2/mocks" - "github.com/topfreegames/pitaya/v2/session" - sessionmocks "github.com/topfreegames/pitaya/v2/session/mocks" - "github.com/topfreegames/pitaya/v2/worker" - workermocks "github.com/topfreegames/pitaya/v2/worker/mocks" + "github.com/topfreegames/pitaya/v3/pkg/cluster" + "github.com/topfreegames/pitaya/v3/pkg/component" + "github.com/topfreegames/pitaya/v3/pkg/config" + "github.com/topfreegames/pitaya/v3/pkg/interfaces" + "github.com/topfreegames/pitaya/v3/pkg/metrics" + "github.com/topfreegames/pitaya/v3/pkg/mocks" + "github.com/topfreegames/pitaya/v3/pkg/session" + sessionmocks "github.com/topfreegames/pitaya/v3/pkg/session/mocks" + "github.com/topfreegames/pitaya/v3/pkg/worker" + workermocks "github.com/topfreegames/pitaya/v3/pkg/worker/mocks" "google.golang.org/protobuf/runtime/protoiface" ) diff --git a/timer.go b/pkg/timer.go similarity index 97% rename from timer.go rename to pkg/timer.go index fce9e7aa..6b4c0ebe 100644 --- a/timer.go +++ b/pkg/timer.go @@ -24,8 +24,8 @@ import ( "math" "time" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/timer" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/timer" ) // NewTimer returns a new Timer containing a function that will be called diff --git a/timer/timer.go b/pkg/timer/timer.go similarity index 99% rename from timer/timer.go rename to pkg/timer/timer.go index e3abaf7f..f5c7ff84 100644 --- a/timer/timer.go +++ b/pkg/timer/timer.go @@ -25,7 +25,7 @@ import ( "sync/atomic" "time" - "github.com/topfreegames/pitaya/v2/logger" + "github.com/topfreegames/pitaya/v3/pkg/logger" ) var timerBacklog int diff --git a/timer/timer_test.go b/pkg/timer/timer_test.go similarity index 99% rename from timer/timer_test.go rename to pkg/timer/timer_test.go index 32af3243..f57c2ac2 100644 --- a/timer/timer_test.go +++ b/pkg/timer/timer_test.go @@ -25,7 +25,7 @@ import ( "time" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/helpers" + "github.com/topfreegames/pitaya/v3/pkg/helpers" ) type alwaysRunCondition struct{} diff --git a/timer_test.go b/pkg/timer_test.go similarity index 95% rename from timer_test.go rename to pkg/timer_test.go index 1617208e..548a63a3 100644 --- a/timer_test.go +++ b/pkg/timer_test.go @@ -25,8 +25,8 @@ import ( "time" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/timer" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/timer" ) type MyCond struct{} diff --git a/tracing/otel.go b/pkg/tracing/otel.go similarity index 97% rename from tracing/otel.go rename to pkg/tracing/otel.go index 269211b9..00f5e0e2 100644 --- a/tracing/otel.go +++ b/pkg/tracing/otel.go @@ -6,7 +6,7 @@ import ( "os" "strings" - "github.com/topfreegames/pitaya/v2/logger" + "github.com/topfreegames/pitaya/v3/pkg/logger" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/exporters/otlp/otlptrace" "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc" diff --git a/tracing/span.go b/pkg/tracing/span.go similarity index 96% rename from tracing/span.go rename to pkg/tracing/span.go index 98b1cd4a..13a8cc11 100644 --- a/tracing/span.go +++ b/pkg/tracing/span.go @@ -23,9 +23,9 @@ package tracing import ( "context" - "github.com/topfreegames/pitaya/v2/constants" - pcontext "github.com/topfreegames/pitaya/v2/context" - "github.com/topfreegames/pitaya/v2/logger" + "github.com/topfreegames/pitaya/v3/pkg/constants" + pcontext "github.com/topfreegames/pitaya/v3/pkg/context" + "github.com/topfreegames/pitaya/v3/pkg/logger" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" diff --git a/tracing/span_test.go b/pkg/tracing/span_test.go similarity index 98% rename from tracing/span_test.go rename to pkg/tracing/span_test.go index 6b54ef4c..0723e81a 100644 --- a/tracing/span_test.go +++ b/pkg/tracing/span_test.go @@ -27,8 +27,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/constants" - pcontext "github.com/topfreegames/pitaya/v2/context" + "github.com/topfreegames/pitaya/v3/pkg/constants" + pcontext "github.com/topfreegames/pitaya/v3/pkg/context" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" diff --git a/util/compression/compression.go b/pkg/util/compression/compression.go similarity index 100% rename from util/compression/compression.go rename to pkg/util/compression/compression.go diff --git a/util/compression/compression_test.go b/pkg/util/compression/compression_test.go similarity index 96% rename from util/compression/compression_test.go rename to pkg/util/compression/compression_test.go index 19c1ee13..ab9f9a29 100644 --- a/util/compression/compression_test.go +++ b/pkg/util/compression/compression_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/topfreegames/pitaya/v2/helpers" + "github.com/topfreegames/pitaya/v3/pkg/helpers" ) var update = flag.Bool("update", false, "update .golden files") diff --git a/util/compression/fixtures/compression_deflate_test_1.golden b/pkg/util/compression/fixtures/compression_deflate_test_1.golden similarity index 100% rename from util/compression/fixtures/compression_deflate_test_1.golden rename to pkg/util/compression/fixtures/compression_deflate_test_1.golden diff --git a/util/compression/fixtures/compression_deflate_test_2.golden b/pkg/util/compression/fixtures/compression_deflate_test_2.golden similarity index 100% rename from util/compression/fixtures/compression_deflate_test_2.golden rename to pkg/util/compression/fixtures/compression_deflate_test_2.golden diff --git a/util/compression/fixtures/compression_deflate_test_3.golden b/pkg/util/compression/fixtures/compression_deflate_test_3.golden similarity index 100% rename from util/compression/fixtures/compression_deflate_test_3.golden rename to pkg/util/compression/fixtures/compression_deflate_test_3.golden diff --git a/util/fixtures/gob_encode_test_1.golden b/pkg/util/fixtures/gob_encode_test_1.golden similarity index 100% rename from util/fixtures/gob_encode_test_1.golden rename to pkg/util/fixtures/gob_encode_test_1.golden diff --git a/util/fixtures/gob_encode_test_2.golden b/pkg/util/fixtures/gob_encode_test_2.golden similarity index 100% rename from util/fixtures/gob_encode_test_2.golden rename to pkg/util/fixtures/gob_encode_test_2.golden diff --git a/util/fixtures/gob_encode_test_3.golden b/pkg/util/fixtures/gob_encode_test_3.golden similarity index 100% rename from util/fixtures/gob_encode_test_3.golden rename to pkg/util/fixtures/gob_encode_test_3.golden diff --git a/util/util.go b/pkg/util/util.go similarity index 92% rename from util/util.go rename to pkg/util/util.go index 65315b7f..9c881ab4 100644 --- a/util/util.go +++ b/pkg/util/util.go @@ -31,17 +31,17 @@ import ( "github.com/nats-io/nuid" - "github.com/topfreegames/pitaya/v2/conn/message" - "github.com/topfreegames/pitaya/v2/constants" - pcontext "github.com/topfreegames/pitaya/v2/context" - e "github.com/topfreegames/pitaya/v2/errors" - "github.com/topfreegames/pitaya/v2/logger" - "github.com/topfreegames/pitaya/v2/logger/interfaces" - "github.com/topfreegames/pitaya/v2/protos" - "github.com/topfreegames/pitaya/v2/serialize" - "github.com/topfreegames/pitaya/v2/serialize/json" - "github.com/topfreegames/pitaya/v2/serialize/protobuf" - "github.com/topfreegames/pitaya/v2/tracing" + "github.com/topfreegames/pitaya/v3/pkg/conn/message" + "github.com/topfreegames/pitaya/v3/pkg/constants" + pcontext "github.com/topfreegames/pitaya/v3/pkg/context" + e "github.com/topfreegames/pitaya/v3/pkg/errors" + "github.com/topfreegames/pitaya/v3/pkg/logger" + "github.com/topfreegames/pitaya/v3/pkg/logger/interfaces" + "github.com/topfreegames/pitaya/v3/pkg/protos" + "github.com/topfreegames/pitaya/v3/pkg/serialize" + "github.com/topfreegames/pitaya/v3/pkg/serialize/json" + "github.com/topfreegames/pitaya/v3/pkg/serialize/protobuf" + "github.com/topfreegames/pitaya/v3/pkg/tracing" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/trace" diff --git a/util/util_test.go b/pkg/util/util_test.go similarity index 96% rename from util/util_test.go rename to pkg/util/util_test.go index e6436b01..1cbd7f4f 100644 --- a/util/util_test.go +++ b/pkg/util/util_test.go @@ -31,12 +31,12 @@ import ( "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" - "github.com/topfreegames/pitaya/v2/conn/message" - "github.com/topfreegames/pitaya/v2/constants" - pcontext "github.com/topfreegames/pitaya/v2/context" - "github.com/topfreegames/pitaya/v2/protos" - "github.com/topfreegames/pitaya/v2/serialize/mocks" - "github.com/topfreegames/pitaya/v2/tracing" + "github.com/topfreegames/pitaya/v3/pkg/conn/message" + "github.com/topfreegames/pitaya/v3/pkg/constants" + pcontext "github.com/topfreegames/pitaya/v3/pkg/context" + "github.com/topfreegames/pitaya/v3/pkg/protos" + "github.com/topfreegames/pitaya/v3/pkg/serialize/mocks" + "github.com/topfreegames/pitaya/v3/pkg/tracing" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/sdk/trace" diff --git a/worker/constants.go b/pkg/worker/constants.go similarity index 100% rename from worker/constants.go rename to pkg/worker/constants.go diff --git a/worker/mocks/rpc_job.go b/pkg/worker/mocks/rpc_job.go similarity index 100% rename from worker/mocks/rpc_job.go rename to pkg/worker/mocks/rpc_job.go diff --git a/worker/models.go b/pkg/worker/models.go similarity index 100% rename from worker/models.go rename to pkg/worker/models.go diff --git a/worker/report.go b/pkg/worker/report.go similarity index 94% rename from worker/report.go rename to pkg/worker/report.go index 117a218f..8778d633 100644 --- a/worker/report.go +++ b/pkg/worker/report.go @@ -4,8 +4,8 @@ import ( "strconv" "time" - "github.com/topfreegames/pitaya/v2/logger" - "github.com/topfreegames/pitaya/v2/metrics" + "github.com/topfreegames/pitaya/v3/pkg/logger" + "github.com/topfreegames/pitaya/v3/pkg/metrics" workers "github.com/topfreegames/go-workers" ) diff --git a/worker/report_test.go b/pkg/worker/report_test.go similarity index 94% rename from worker/report_test.go rename to pkg/worker/report_test.go index ef9c5510..faaa1e82 100644 --- a/worker/report_test.go +++ b/pkg/worker/report_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/golang/mock/gomock" - "github.com/topfreegames/pitaya/v2/metrics" - "github.com/topfreegames/pitaya/v2/metrics/mocks" + "github.com/topfreegames/pitaya/v3/pkg/metrics" + "github.com/topfreegames/pitaya/v3/pkg/metrics/mocks" ) func TestReportJobsRetry(t *testing.T) { diff --git a/worker/rpc_job.go b/pkg/worker/rpc_job.go similarity index 100% rename from worker/rpc_job.go rename to pkg/worker/rpc_job.go diff --git a/worker/worker.go b/pkg/worker/worker.go similarity index 96% rename from worker/worker.go rename to pkg/worker/worker.go index 7883aa6e..767afedd 100644 --- a/worker/worker.go +++ b/pkg/worker/worker.go @@ -28,10 +28,10 @@ import ( "github.com/golang/protobuf/proto" workers "github.com/topfreegames/go-workers" - "github.com/topfreegames/pitaya/v2/config" - "github.com/topfreegames/pitaya/v2/constants" - "github.com/topfreegames/pitaya/v2/logger" - "github.com/topfreegames/pitaya/v2/logger/interfaces" + "github.com/topfreegames/pitaya/v3/pkg/config" + "github.com/topfreegames/pitaya/v3/pkg/constants" + "github.com/topfreegames/pitaya/v3/pkg/logger" + "github.com/topfreegames/pitaya/v3/pkg/logger/interfaces" ) // Worker executes RPCs with retry and backoff time diff --git a/worker/worker_test.go b/pkg/worker/worker_test.go similarity index 98% rename from worker/worker_test.go rename to pkg/worker/worker_test.go index 21ea244a..7e3a4e1b 100644 --- a/worker/worker_test.go +++ b/pkg/worker/worker_test.go @@ -8,7 +8,7 @@ import ( "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" workers "github.com/topfreegames/go-workers" - "github.com/topfreegames/pitaya/v2/worker/mocks" + "github.com/topfreegames/pitaya/v3/pkg/worker/mocks" ) type fakeProtoMessage struct { diff --git a/pitaya-cli/commands.go b/repl/commands.go similarity index 98% rename from pitaya-cli/commands.go rename to repl/commands.go index 6847cdae..12714a5d 100644 --- a/pitaya-cli/commands.go +++ b/repl/commands.go @@ -18,7 +18,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -package main +package repl import ( "encoding/json" @@ -26,7 +26,7 @@ import ( "strings" "github.com/sirupsen/logrus" - "github.com/topfreegames/pitaya/v2/client" + "github.com/topfreegames/pitaya/v3/pkg/client" ) func connect(logger Log, addr string, onMessageCallback func([]byte)) (err error) { diff --git a/pitaya-cli/file.go b/repl/file.go similarity index 99% rename from pitaya-cli/file.go rename to repl/file.go index d9033506..230a27d6 100644 --- a/pitaya-cli/file.go +++ b/repl/file.go @@ -18,7 +18,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -package main +package repl import ( "bufio" diff --git a/pitaya-cli/helpers.go b/repl/helpers.go similarity index 97% rename from pitaya-cli/helpers.go rename to repl/helpers.go index 90d63e37..3a5016e9 100644 --- a/pitaya-cli/helpers.go +++ b/repl/helpers.go @@ -18,7 +18,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -package main +package repl import ( "crypto/tls" @@ -29,7 +29,7 @@ import ( "github.com/abiosoft/ishell/v2" "github.com/mitchellh/go-homedir" "github.com/sirupsen/logrus" - "github.com/topfreegames/pitaya/v2/client" + "github.com/topfreegames/pitaya/v3/pkg/client" ) func protoClient(log Log, addr string) error { diff --git a/pitaya-cli/log.go b/repl/log.go similarity index 98% rename from pitaya-cli/log.go rename to repl/log.go index 05de22bb..fbbc8d65 100644 --- a/pitaya-cli/log.go +++ b/repl/log.go @@ -18,7 +18,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -package main +package repl // Log has log methods type Log interface { diff --git a/pitaya-cli/main.go b/repl/main.go similarity index 81% rename from pitaya-cli/main.go rename to repl/main.go index 0640258c..63a8cbb7 100644 --- a/pitaya-cli/main.go +++ b/repl/main.go @@ -18,14 +18,13 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -package main +package repl import ( - "flag" "sync" - "github.com/topfreegames/pitaya/v2/client" - "github.com/topfreegames/pitaya/v2/session" + "github.com/topfreegames/pitaya/v3/pkg/client" + "github.com/topfreegames/pitaya/v3/pkg/session" ) var ( @@ -39,20 +38,19 @@ var ( handshake *session.HandshakeData ) -func main() { - flag.StringVar(&docsString, "docs", "", "documentation route") - flag.StringVar(&fileName, "filename", "", "file with commands") - flag.BoolVar(&prettyJSON, "pretty", false, "print pretty jsons") - flag.Parse() +func Start(docs, filename string, prettyJSON bool) { + docsString = docs + fileName = filename + prettyJSON = prettyJSON handshake = &session.HandshakeData{ Sys: session.HandshakeClientData{ - Platform: "mac", + Platform: "repl", LibVersion: "0.3.5-release", BuildNumber: "20", Version: "1.0.0", }, User: map[string]interface{}{ - "age": 30, + "client": "repl", }, } diff --git a/pitaya-cli/shell.go b/repl/shell.go similarity index 99% rename from pitaya-cli/shell.go rename to repl/shell.go index d8c096e2..bb3d9ae8 100644 --- a/pitaya-cli/shell.go +++ b/repl/shell.go @@ -18,7 +18,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -package main +package repl import ( "github.com/abiosoft/ishell/v2" diff --git a/xk6-pitaya/Dockerfile b/xk6-pitaya/Dockerfile index 3ecdfb07..b6f54131 100644 --- a/xk6-pitaya/Dockerfile +++ b/xk6-pitaya/Dockerfile @@ -8,7 +8,7 @@ RUN go install go.k6.io/xk6/cmd/xk6@latest # Feel free to add other extensions using the '--with ...'. RUN xk6 build \ --with github.com/topfreegames/pitaya/xk6-pitaya@$pitaya_revision \ - --with github.com/topfreegames/pitaya/v2@$pitaya_revision \ + --with github.com/topfreegames/pitaya/v3@$pitaya_revision \ --output /k6 # Use the operator's base image and override the k6 binary diff --git a/xk6-pitaya/client.go b/xk6-pitaya/client.go index bdbeaf23..fd43817e 100644 --- a/xk6-pitaya/client.go +++ b/xk6-pitaya/client.go @@ -9,9 +9,9 @@ import ( "time" "github.com/dop251/goja" - pitayaclient "github.com/topfreegames/pitaya/v2/client" - pitayamessage "github.com/topfreegames/pitaya/v2/conn/message" - "github.com/topfreegames/pitaya/v2/session" + pitayaclient "github.com/topfreegames/pitaya/v3/pkg/client" + pitayamessage "github.com/topfreegames/pitaya/v3/pkg/conn/message" + "github.com/topfreegames/pitaya/v3/pkg/session" "go.k6.io/k6/js/modules" "go.k6.io/k6/metrics" ) diff --git a/xk6-pitaya/module.go b/xk6-pitaya/module.go index 0ec3a0af..caee1797 100644 --- a/xk6-pitaya/module.go +++ b/xk6-pitaya/module.go @@ -9,8 +9,8 @@ import ( "github.com/dop251/goja" "github.com/sirupsen/logrus" - pitayaclient "github.com/topfreegames/pitaya/v2/client" - "github.com/topfreegames/pitaya/v2/session" + pitayaclient "github.com/topfreegames/pitaya/v3/pkg/client" + "github.com/topfreegames/pitaya/v3/pkg/session" "go.k6.io/k6/js/common" "go.k6.io/k6/js/modules" )